Skip to content

Conversation

@jojo2357
Copy link
Contributor

Fix #3643

Very simple, added tests. Do we want to maybe filter out commands like href whose required args are not interchangeable?

Copy link
Collaborator

@PHPirates PHPirates left a comment

Choose a reason for hiding this comment

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

Thanks! Looks good, just a few minor things. We should also make sure the intention preview is working (if you hover over the intention name)

Do we want to maybe filter out commands like href whose required args are not interchangeable?

I don't think so, if I for example messed up the order of arguments for href this intention would be really useful to switch them to the correct place

@jojo2357
Copy link
Contributor Author

I got it working in the ide, but it wont pass any tests.

@PHPirates
Copy link
Collaborator

Thanks, you were nearly there! I changed two things:

  • When creating a parameter from text, we need to make sure it is actually parsed as a parameter, so it needs to have a command in front of it
  • The parameter is a child of the command, not of the command's parent

Please check if I missed any edge cases though.

@PHPirates PHPirates merged commit 9de10ee into Hannah-Sten:master Sep 19, 2024
8 checks passed
@PHPirates PHPirates added this to the Next milestone Sep 19, 2024
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.

Context menu action to reorder command args

2 participants