-
-
Notifications
You must be signed in to change notification settings - Fork 227
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
Unify tooltip and headline and add the corresponding icon #1455
Conversation
* search and share icons on the left get an `title` attribute * all panels start with an `h3` headline including the corresponding icon * thus add smaller versions of the 24px-icons to 16.svg or 16-white.svg * unify strings for button and headline to match
cc6af31
to
259a002
Compare
@@ -325,6 +325,7 @@ L.DomUtil.createFieldset = (container, legend, options) => { | |||
L.DomUtil.createButton = (className, container, content, callback, context) => { | |||
const el = L.DomUtil.add('button', className, container, content) | |||
el.type = 'button' | |||
el.title = content |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the benefit of adding the same title
as the content
for a button
element?
The title attribute is shown as tooltip on hovering. The edit-buttons on the right already had tooltips, this line also adds tool tips for the search and share buttons on the left (that do not show the text, but only icons). Do you see any negative side effect for other text buttons?
|
If the content of the tooltip is the same as the displayed label of the button, I think it might confuse the user with extra visual information that is not really pertinent. In other places we tried to put additional informations in that case (like keyboard shortcuts or additional context) and there might still be some inconsistencies(?). This is a thin line between helping the user and not overloading the interface 🤸 |
If that is the desired strategy, there are a lot of inconsistencies: Most of the Close buttons already have same title and text: umap/umap/static/umap/js/umap.ui.js Lines 39 to 42 in 8ce09b0
umap/umap/static/umap/js/umap.ui.js Lines 104 to 105 in 8ce09b0
umap/umap/static/umap/js/umap.core.js Lines 451 to 452 in 8ce09b0
All labels in edit forms seem to apply the strategy to set the same text and title: umap/umap/static/umap/js/umap.forms.js Line 72 in 8ce09b0
So for me the only inconsistency seemed to be the missing title for share and search buttons on the left, which I want to fix in this PR: Would you be happy with a specific title for those buttons on the left? Then I'll replace umap/umap/static/umap/js/umap.core.js Line 328 in e020a36
with individually setting for those buttons:
|
Fair enough 😅 I would say that is not blocking for that PR, let's do that as a future step toward cohesion 👍 |
Thank you! |
Tooltips for all the buttons now match the headline on top of the dialogs (with #1449 the headings should probably also be filled from the new constants)
Added
h3
heading in dialogs without any headline and re-arranged someh3
/h4
inconsistencies.This PR separates out the first part of #1454 as separate PR.