Skip to content

Restore code actions order#1273

Merged
mergify[bot] merged 3 commits into
masterfrom
reorder-codeactions
Jan 30, 2021
Merged

Restore code actions order#1273
mergify[bot] merged 3 commits into
masterfrom
reorder-codeactions

Conversation

@pepeiborra

Copy link
Copy Markdown
Collaborator

An unfortunate side effect of recent changes is that the extend import suggestions ended up at the bottom of the list.

This change puts back all code actions provider together so they can be reordered more easily, and restores the previous order where extend imports would be near the top of the list

An unfortunate side effect of recent changes is that the extend import
suggestions ended up at the bottom of the list
@pepeiborra
pepeiborra requested review from berberman and konn January 30, 2021 10:59
Comment thread ghcide/src/Development/IDE/Plugin/CodeAction/ExactPrint.hs
Comment thread ghcide/src/Development/IDE/Plugin/CodeAction/ExactPrint.hs

@konn konn left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@pepeiborra pepeiborra added the merge me Label to trigger pull request merge label Jan 30, 2021

@jneira jneira left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe add some tests about the ordering would be great, to not break it (relative between different kinds of?)

@pepeiborra

Copy link
Copy Markdown
Collaborator Author

maybe add some tests about the ordering would be great, to not break it (relative between different kinds of?)

Such tests would require adjustment every time a new code action is added, an existing code action is changed, etc. So I'm not keen on adding them, some tests are more trouble than they're worth.

But if anyone else wants to do it, I won't oppose either.

@jneira

jneira commented Jan 30, 2021

Copy link
Copy Markdown
Member

we could check at least the preferred ones are below the cut limit, but definitely not in this pr
otoh relative tests are more maintainable, cause tests than a is before b could be kept while a and b exist

@mergify
mergify Bot merged commit b97b469 into master Jan 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge me Label to trigger pull request merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants