Skip to content

Add contextual menus to input fields #8672

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
Apr 18, 2019

Conversation

Pieter12345
Copy link
Contributor

  • Add contextual menus to text-based monitors (serial / network monitor).
  • Add contextual menu to installer dialog search filter fields (library manager / contribution manager).
  • Make installer dialogs focus the search filter field on window-open. This prevents pastes from ending up elsewhere in the case that they are performed before the field has been focussed at least once.
    Fixes Contextual menu #8423.

@facchinm
Copy link
Member

@ArduinoBot build this please

@facchinm
Copy link
Member

Hi @Pieter12345 , I'd prefer to merge this one over #8640 just to keep the UI as clean as possible (I know, adding a button doesn't look THAT terrible but it opens a can of worms about adding yet another button 🙂 ). Is the copy functionality via contextual menu exactly the same as the Copy button?

@Pieter12345
Copy link
Contributor Author

Hello @facchinm, this contextual menu is added to the input field. The copy button from #8640 copies the output text area. This could also be added as a contextual (right-click) menu in this output area, but I believe a button will be more easily noticable and usable by users.

@per1234
Copy link
Collaborator

per1234 commented Mar 19, 2019

I think it's a nice contribution to the Arduino IDE. I have seen complaints about the lack of context menus on the Arduino forum multiple times over the years. I always just use keyboard shortcuts to copy and paste, but it seems that some people either don't know about this or prefer using the mouse.


Would it be possible to give the Serial Monitor input field focus whenever its context menu is opened? I instinctively expected that to happen the first time I tested the feature there, and I believe that is the standard behavior in most programs (it is in Firefox at least, I didn't check elsewhere).


I'm not sure whether this is outside the scope of this PR, but would it be possible to also add context menus to the input fields in File > Preferences, including the dialog accessed by clicking the button on the right side of the "Additional Boards Manager URLs" input field? There was a complaint on the Arduino Forum about this within the last few days.

@facchinm
Copy link
Member

@Pieter12345 got it, I'm commenting on the other PR.

- Add contextual menus to text-based monitors (serial / network monitor).
- Add contextual menu to installer dialog search filter fields (library manager / contribution manager).
- Make installer dialogs focus the search filter field on window-open. This prevents pastes from ending up elsewhere in the case that they are performed before the field has been focussed at least once.
Fixes arduino#8423.
@Pieter12345
Copy link
Contributor Author

Rebased this PR onto master.

@per1234 I see what you mean. When the input field is not focussed, right clicking and selecting paste does not paste the text. If these contextual menus should be added in more places, perhaps it'll be worth it to add a static method to some helper class that adds such a menu to some given Component. Do you perhaps know if such a helper class already exists?

@per1234
Copy link
Collaborator

per1234 commented Mar 31, 2019

Do you perhaps know if such a helper class already exists?

@Pieter12345 unfortunately I'm quite clueless about the Arduino IDE's Java code.


To add one more request (which, again, might be beyond the scope of this PR): It would be nice to also have the context menu working in the Arduino IDE's console window. I remember that being brought up by users on the forum before.

@facchinm facchinm merged commit e92d594 into arduino:master Apr 18, 2019
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.

Contextual menu
4 participants