Skip to content

Fixed sorting of sketches and examples - ignore case #222

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 18, 2021
Merged

Fixed sorting of sketches and examples - ignore case #222

merged 1 commit into from
Mar 18, 2021

Conversation

Sebastian-Brzuzek
Copy link
Contributor

simple solution for issue #185

@kittaakos
Copy link
Contributor

Thanks for your contribution, @Sebastian-Brzuzek. Your PR currently depends on #213. Please bear with us.
The fix seems good to me. Can we do the same for libraries? We have to change the code here:

const menuAction = { commandId, label: libraryOrPlaceholder.name };

@Sebastian-Brzuzek
Copy link
Contributor Author

@kittaakos thanks for feedback. It looks like there is general problem with Action Menu in Theia. Take a look at this commit: Sebastian-Brzuzek/theia@c060607

I can see the following options:

  1. Convince Theia team to make global change - which will solve this kind of problems once for all.
  2. Find all references where registerMenuAction method is used in Arduino Ide and to add precalculated order property as needed.
  3. Add some kind of "wrapper" to registerMenuAction method (or MenuAction) to override current Theia implementation in one place for Arduino Ide project.

I can help with option 2 or 3. But I'm not sure if I will have time to make some progress with option 1.

One more question - what is expected order in case of menu items with labels which differ only on lower/upper case letter level? I know it is a little bit strange edge case 😉

Maybe there are some other options, what do you think?

@kittaakos
Copy link
Contributor

For the sake of simplicity, I am going to approve this PR once you have rebased it from the main. Could you please do that? 😊 After the rebase, the workflow should restart and pass. #213 was merged.

Thank you so much for looking into the possible solutions.

  1. Convince Theia team to make global change - which will solve this kind of problems once for all.

Let's do this. I can help with this.

2. Find all references where registerMenuAction method is used in Arduino Ide and to add precalculated order property as needed.

We could do that, but once we have a Theia-based solution, it's unnecessary.

3. Add some kind of "wrapper" to registerMenuAction method (or MenuAction) to override current Theia implementation in one place for Arduino Ide project.

Ideally, it should be possible to customize the default MenuModelRegistry in Theia. I will look into this as part of the first option.

@Sebastian-Brzuzek
Copy link
Contributor Author

Sebastian-Brzuzek commented Mar 15, 2021

It has taken some time (I have done rabase using the GitHub Desktop App for the first time 😃 ) but finally checks are successful.

Regarding customization of the default MenuModelRegistry in Theia, it is great idea for flexible solution, which will allow for safe transition without breaking changes.

@kittaakos
Copy link
Contributor

It has taken some time (I have done rabase using the GitHub Desktop App for the first time 😃 ) but finally checks are successful.

I am glad you've managed to do it 💪

I have checked your code, it looks good to me. I also tried your changes in-action, it's also good.

Screen Shot 2021-03-17 at 09 29 13

We need approval from someone else. @ubidefeo could you please verify the change and approve it if you like it? Thank you!

Copy link
Contributor

@kittaakos kittaakos left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution, @Sebastian-Brzuzek 👍 Your changes look good to me.

Copy link

@ubidefeo ubidefeo left a comment

Choose a reason for hiding this comment

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

thank you for your contribution @Sebastian-Brzuzek
sorry it took me a while to chime in with my 👍🏼

🙏🏼

@kittaakos kittaakos merged commit f6e623c into arduino:main Mar 18, 2021
@per1234 per1234 added topic: code Related to content of the project itself type: enhancement Proposed improvement labels Oct 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants