-
Notifications
You must be signed in to change notification settings - Fork 0
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
Bug/WP-782: Resized View Full Path link in modals #1036
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1036 +/- ##
==========================================
+ Coverage 72.50% 75.17% +2.66%
==========================================
Files 534 323 -211
Lines 33771 27486 -6285
Branches 2993 2263 -730
==========================================
- Hits 24487 20663 -3824
+ Misses 9086 6785 -2301
+ Partials 198 38 -160
Flags with carried forward coverage won't be shown. Click here to find out more. |
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.
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.
Now that I have context (your answer, this PR, WP-782, and WP-50), I can offer better guidance.
The Goal
Change the font size of some [type="link"]
/.as-link
buttons, but not all; while not changing the font size of all buttons in a modal (i.e. modalButton
), cuz some buttons should have the standard size (e.g. the [Modal] and [Copy] buttons).
Proposal
Do not extend <Button>
. Add style in appropriate component's stylesheet. New fix needed for WP-50.
Details & Video for WP-782
- Do not add
modalButton
. Do not add styles in<Button>
.1 - Move existing
font-size
style inDataFilesModals.scss
from.dataFilesModal .breadcrumbs
to.dataFilesModal .breadcrumbs-container
.
Please use1.2rem
.
WP-782.mov
- Change
.root.as-link { font-size: 1rem }
tofont-size: inherit
. - Add new style to
CombinedBreadcrumbs.module.scss
as.combined-breadcrumbs .breadcrumb-container button { font-size: 1rem; }
WP-50.mov
Why?
- The font size of
as-link
should, by default, inherit the font-size of it's parent, because it replicates a<a>
which would normally inherit the font-size of it's parent.2 - Based on context, the style needed is specific to the component,
<CombinedBreadcrumbs>
, because it can style<DataFilesBreadcrumbs>
without affecting modal instances of it.<CombinedBreadcrumbs>
is not designed to add a class to a child component, butCombinedBreadcrumbs.module.scss
can target an element (button
) within a native/global class (breadcrumb-container
).
Footnotes
The footnotes are for content hidden in details sections, i.e. "▸ Details & Video for …" and the "▸ Why?" within each. Click the triangle to open.
Footnotes
-
I appreciate your effort to extend
<Button>
, but I don't yet believe this is a use case to do so. ↩ -
"Buttons as links should be same font-size as a regular link text would be in that same location. […] So, if a regular link would be 16px in a location, then a button as link in that location should be 16px." — me answering you in
#design
channel thread. ↩ ↩2 -
…and other children do not exist or other children would not need larger font size yet inherit from parent… ↩
client/src/components/DataFiles/DataFilesBreadcrumbs/DataFilesBreadcrumbs.jsx
Outdated
Show resolved
Hide resolved
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.
I added videos to #1036 (review).
My most recent push (with Wes' help) has fixed this. |
Huge thank you for this! I would not have thought to look in the files you referenced. I greatly appreciate it. |
@jmcmillenmusic, You're welcome. I also would not have thought to work in those files. I found them to be suitable only because I thought to search which React components |
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.
Code changes look as expected. I have not re-tested yet.
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.
Mistakes. Some mine. I'll fix and test. Hold on a sec.
client/src/components/DataFiles/DataFilesModals/DataFilesModals.scss
Outdated
Show resolved
Hide resolved
client/src/components/DataFiles/DataFilesModals/DataFilesModals.scss
Outdated
Show resolved
Hide resolved
client/src/components/DataFiles/CombinedBreadcrumbs/CombinedBreadcrumbs.module.scss
Outdated
Show resolved
Hide resolved
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.
Overview
The "View Full Path" links in modals is now too big compared to the rest of the text in the modal.
Related
Changes
I added a
modalButton
style to the "View Full Path" links and used CSS to reduce its size.Testing
UI
As of a9c89af
As of 7778ead
Notes
@wesleyboar updated UI after a9c89af.