-
-
Notifications
You must be signed in to change notification settings - Fork 332
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
In-app help content #1024
In-app help content #1024
Conversation
Use translucent background so that it looks good against non-white backgrounds.
Don't reference @mathesar-component-library alias because it will result in circular references that lead to test failures.
Codecov Report
@@ Coverage Diff @@
## 531_multi_col_constraints #1024 +/- ##
==========================================================
Coverage 93.27% 93.27%
==========================================================
Files 95 95
Lines 3463 3463
==========================================================
Hits 3230 3230
Misses 233 233
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
@kgodey From a product perspective, would you like to give an opinion on this new pattern of sprinkling help content popovers throughout the UI? @ghislaineguerin From a design perspective, would you like to give an opinion on the appearance and functionality of the help messages? |
@seancolsen I think it's a great pattern! |
@seancolsen I'm wondering if we need to have some rules for using the pop-over instead of inline text. This pattern looks perfect for definitions, but it seemed a bit lengthy to explain more in-depth concepts when adding the unique constraint. Should we separate hints from definitions maybe? For now, I think we can go ahead and have both under this pattern, and later we might decide to treat hints differently or link to the relevant documentation for longer texts. |
Yeah, linking to external docs is exactly what I'd like to do once we have them set up. For now, this in-app pattern will help users and give us a head start on the content we want to publish externally. |
I like this, was aiming for a similar approach with error handling, where we could have hints to resolve the error and links to the doc that would explain in detail the cause of error(Null violation exception for example) |
@seancolsen Please feel free to update the css and dom structuring of our Here are a few ideas:
|
@ghislaineguerin @kgodey @seancolsen Regarding the UX for the help content, it is currently displayed only upon clicking the help icon. There are two widely used patterns for inline-help:
We have gone with option 2 in this PR, which I also think is best suited for us. I'd like to confirm this from a UX perspective and how we envision inline-helps to function in the future. |
I think option 2 is fine. |
@pavish regarding the CSS.... It sounds like we're in agreement that the code in this PR works, but accentuates the need for some lower-level CSS refactoring. This situation reminds me of #915 in which I critiqued your use of With our desire to ship features faster, I suggest taking a similar approach here. If you're okay with merging as-is, I'll create a new ticket for the CSS refactoring. |
@seancolsen Sounds good. Please create a new issue for streamlining css, and remove the css update part of #971 and place it in the new issue. |
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.
Looks good to me!
I added two new issues:
I kept the issues separate because I view them as independent (though of a similar topic). With our agreed intent to de-prioritize the component library I've placed both issues in the "Future Consideration" milestone so as to avoid concerning ourselves with them before the Alpha release. |
Fixes #914
Goals
Add a
Help
component that shows help content in a popover.Use is as follows:
Establish a convention of placing help content inside dedicated components which live in
__help__
directories close to the code where they get used. This pattern helps to separate concerns of content from concerns of functionality, keeping the higher-level components less-cluttered.Move some existing help content from the Schemas page into a
Help
popover.Add some new help content to the Table Constraints modal.
Demo
The following gif shows all the in-app help content I've added in this PR.
Issues
In
Help.scss
, I had to use a couple awkward CSS selectors,button.dropdown.trigger.no-arrow.help-trigger
and.dropdown.help-content
because I was fighting against the specificity of the CSS within the lower-level components. @pavish I'm curious to hear your recommendation for a better way to handle this. If it were all up to me, I would be setting up our CSS very differently, so I'd like some guidance here. And I want to make sure not to use!important
anywhere in our component library. With mypadding: 0;
CSS as an example, what's the correct way to do this? I tried settingtriggerClass="padding-zero"
onDropdown
inHelp.scss
, but that didn't work becausebutton.btn.padding-zero
has lower specificity thanbutton.dropdown.trigger.no-arrow
. I feel like we need to make some modifications toButton
and/orDropdown
to support my use-case of a dropdown without padding, but I'm not sure how to approach it and stay consistent with the our CSS patterns.Line height within help content is noticeably narrow. That should be addressed in Improve line-height CSS #999
Checklist
Update index.md
).master
branch of the repositoryDeveloper Certificate of Origin
Developer Certificate of Origin