Skip to content

Conversation

friday
Copy link
Member

@friday friday commented Dec 9, 2021

Instead of this

from ulauncher.api.shared.action.RenderResultListAction import RenderResultListAction

...and returning RenderResultListAction(list_of_items), you can now just return list_of_items.

This applies to all places RenderResultListAction was previously used, including the modes handle_query method, the extension query listener and and the extensions on_enter and on_alt_enter method.

For the extension methods this change is backward compatible, but as step two to this (in a future major release) we should remove RenderResultListAction completely as an action and only support returning lists. Primarily because this API imports a lot of internals and it's problematic to expose it as part of the API #920 #285. I think it's also better to restrict the extension query listener to only accept this instead of any action, so that users get a more consistent and reliable experience (typing query always give them a list of choices), and extension developers get better guidelines to provide this. #864

Checklist

  • Verify that the test command ./ul test is passing (the CI server will check this if you don't)
  • Update the documentation according to your changes (when applicable)
  • Write unit tests for your changes (when applicable)

@friday friday added this to the 6.0.0 milestone Dec 9, 2021
@friday friday force-pushed the v6-simplify-result-rendering branch from 2a52fdf to f0c3b4c Compare December 10, 2021 00:03
@friday friday merged commit cb5e039 into v6 Dec 10, 2021
@friday friday deleted the v6-simplify-result-rendering branch December 10, 2021 00:11
@gornostal
Copy link
Member

I agree with your point about the consistency of user experience!
And I like that you updating tests too 🙂 👍

@friday friday mentioned this pull request Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants