Skip to content
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

Add tooltips to the action bar #6035

Merged
merged 5 commits into from
Mar 27, 2023

Conversation

Procrat
Copy link
Contributor

@Procrat Procrat commented Mar 22, 2023

Pull Request Description

Implements #5933: adding tooltips to the buttons next to nodes.

To make the UI consistent, I've added tooltips to the ToggleButton class directly, since whenever you have an icon button, it seems helpful to have a tooltip.

ToggleButton is only used for the profiling button in the top-right corner and the buttons next to nodes. The output context switch button isn't implemented yet, but once it is, adding a tooltip should be one-liner.

Recording 2023-03-22 at 17 21 58

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the Scala, Java, and Rust style guides. In case you are using a language not listed above, follow the Rust style guide.
  • All code has been tested:
    • Unit tests have been written where possible.
    • If GUI codebase was changed, the GUI was tested when built using ./run ide build.

@Procrat Procrat force-pushed the wip/procrat/node-action-bar-tooltips-5933 branch from d88144e to ce7010e Compare March 22, 2023 16:02
@Procrat Procrat marked this pull request as ready for review March 22, 2023 16:30
@Procrat Procrat linked an issue Mar 22, 2023 that may be closed by this pull request
Copy link
Member

@wdanilo wdanilo left a comment

Choose a reason for hiding this comment

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

Beside the code comments:

  1. The text on the tooltip is not vertically centered - it looks bad. This should be fixed.
  2. The tooltip should appear with some delay. This should be controlled by the mouse tooltip logic. We can modify it in a separate task, but its important to fix it.

CHANGELOG.md Outdated
@@ -126,6 +126,7 @@
shortened labels for entries with long module paths. When an option is
selected from the dropdown, the necessary module imports are inserted,
eliminating the need for fully qualified names.
- [Icon buttons now have tooltips.][6035]
Copy link
Member

Choose a reason for hiding this comment

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

Please write a better description - it is user-facing changelog.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Any suggestions? Please be constructive when providing PR comments.

Copy link
Member

Choose a reason for hiding this comment

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

I was sure it was constructive enough. User-facing changelog should describe what is the change, why it was made and what benefits it gives users.

Copy link
Contributor

Choose a reason for hiding this comment

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

I played with GPT for a minute:

[Added tooltips to icon buttons][6035] for improved usability. Users can now quickly understand each button's function.

app/gui/view/graph-editor/src/component/node/action_bar.rs Outdated Show resolved Hide resolved
lib/rust/ensogl/component/toggle-button/src/lib.rs Outdated Show resolved Hide resolved
Comment on lines 222 to 223
// Explicitly define the tooltip placement if the default was used, to ensure that, when
// multiple tooltips are being used, we always override to the one we want.
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand this sentence. What is "the one that we want"? Also, it has some minor English grammar mistakes. See granary or chatgpt to check correctness, please.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added some extra context. Let me know if you're still confused. Happy to jump into a call to explain it.

@Procrat
Copy link
Contributor Author

Procrat commented Mar 23, 2023

@wdanilo: I agree on both points you raise. However, they seem orthogonal to this change, so I suggest doing both in a separate PR.

@Procrat Procrat requested a review from wdanilo March 23, 2023 08:15
@vitvakatu
Copy link
Contributor

@Procrat please create an issue for text position + show delay, let's make it now, in a separate PR.

@Procrat Procrat requested review from wdanilo and removed request for wdanilo March 23, 2023 08:53
@Procrat
Copy link
Contributor Author

Procrat commented Mar 23, 2023

I've create an issue here for the visual improvement of tooltips in general.

* develop:
  Layout fixes (#6066)
  Use new Enso Hash Codes and Comparable (#6060)
  Search suggestions by static attribute (#6036)
  Use .node-version for pinning Node.js version (#6057)
  Fix code generation for suggestion preview (#6054)
  Implementation of EnsoGL predefined Rectangle shape. (#6033)
  Tidy up the public module level statics (#6032)
  Cursor aware Component Browser (#5770)
@MichaelMauderer
Copy link
Contributor

QA: Passed.

@Procrat Procrat added the CI: Ready to merge This PR is eligible for automatic merge label Mar 27, 2023
@mergify mergify bot merged commit b977b5a into develop Mar 27, 2023
@mergify mergify bot deleted the wip/procrat/node-action-bar-tooltips-5933 branch March 27, 2023 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

A help tooltip when hovering the icons near the node.
4 participants