-
Notifications
You must be signed in to change notification settings - Fork 255
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
closes #2288: rework workspace type selection dialog #2352
closes #2288: rework workspace type selection dialog #2352
Conversation
@glefi Thanks for checking. As I mentioned in #2288, the typography for those elements should be styled as an If you update those elements to match the typographic specifications in #2093, plus update the dialog header to be an By the way, the mouse selection looks good (highlighting and cursor) but I notice I can't use the dialog with the keyboard. But I know this is WIP so you might not have gotten to that yet. |
95ae7a4
to
837a98b
Compare
Codecov Report
@@ Coverage Diff @@
## master #2352 +/- ##
==========================================
- Coverage 92.71% 92.49% -0.22%
==========================================
Files 135 137 +2
Lines 1852 1852
==========================================
- Hits 1717 1713 -4
- Misses 135 139 +4
Continue to review full report at Codecov.
|
@ggeisler I've changed the text formatting according to the typographic specifications and the keyboard navigation works now, too. But now the required height of the text elements is slightly higher than 100px, maybe we should increase the image height, what do you think? |
container={container} | ||
id="workspace-settings" | ||
onClose={handleClose} | ||
onKeyDown={event => this.keyDownHandler(event)} |
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 don't know if it's common, to set the keyDownListener to the hosting node, but I thought, especially when there will be more workspaceTypes perhaps in the future, we could save some locs this way.
} | ||
|
||
/** */ | ||
selectPreviousItem() { |
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.
A simple toggling function would have been sufficient here, but I tried to be prepared for some additional workspaceTypes that may come in the future.
@glefi Sure, assuming you only need to make the images a little bit taller (110 or 120px?) that sounds fine. This is looking good but a couple things I noticed (in case you aren't aware):
This actually works correctly when using the keyboard (nice work on getting the keyboard nav working!) but compare the difference when using the mouse.
|
514bd95
to
99947ef
Compare
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.
@glefi This is getting closer but I think we need further work to get it to look right:
Images
It's great to see the SVGs in there but something isn't right about the sizing. These SVGs have a native aspect ratio of 4:3 (e.g., 160px wide by 120px high) but what I see in the app is almost square (from the web inspector it seems that they are sized 126px wide by 120px high), which distorts the image. It looks like you have defined the width and height to be 160x120 but for some reason that is not what is being rendered.
I know we previously discussed making the images taller, but aside from the aspect ratio problem, I think the images and entire rows for the two options are bigger than they need to be. So I suggest:
- Make the images 90px in height
- Make sure the images have the correct aspect ratio of 4:3
Option heading typography
The "Elastic" and "Mosaic" headings are using an H2
element. In the ticket specifications for this I suggested the headings be:
styled using the H3 typography, but don't use a heading element
I think we should stick to that because these are not structural elements that we want to appear in a list of headings read by a screenreader, for example. So we want them to use a non-heading element (I think a p
would work) but then apply the H3 typography styling to them so they appear visually similar to an H3
. I don't know how we do that, but I think others on the team have applied a typographical style to change an element from its default typographical styling.
153f472
to
dd2ce46
Compare
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.
Nice @glefi, the SVGs look great now. I have three more suggestions, which are minor spacing-related suggestions. It looks good overall but I think the spacing should be a bit tighter. I assume you can make these adjustments just to this dialog and these won't affect anything more globally, but let me know if that is not the case.
The first two suggestions are to reduce the vertical padding on the div
that contains the option title and description text. They are both to the .jss514
class as shown in the screenshot below.
- Add
0
for the top/bottom padding of.jss514
. - Reduce the
.jss514:last-child
padding-bottom to 12px (from 24px)
The other suggestion is to add a new padding-bottom: 0;
to .jss328
, the p
that contains the option titles. That will just provide a bit of vertical space between the option title and its description text and better distinguish the option title from the description.
dd2ce46
to
b2239ef
Compare
@ggeisler Thanks for your feedback. I've added your suggestions to the pr. What do you think about it? |
Looks good @glefi! |
<Card className={classes.card}> | ||
<CardMedia | ||
className={classes.media} | ||
image="/src/images/icon_workspace_elastic.svg" |
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'm concerned that referencing the image this way will hardcode the image path (and its not included in the build). Is there a way to reference the SVG directly?
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.
@mejackreed Do we have a pattern established for this anywhere else in the repo?
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.
Yeah, I think the predominate pattern is to wrap the SVG in a component like we do with the icons:
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.
@ggeisler Could you provide the two SVGs in a scaled variant (90x120)? Because resizing the files with inkscape seems not to work properly.
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.
@glefi I've updated the gists I previously gave you, so try those and see how they work:
6296487
to
a50ad21
Compare
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 @glefi .. thanks for getting this fixed up!
} = this.props; | ||
return ( | ||
<Dialog | ||
aria-labelledby="workspace-selection-dialog-title" | ||
container={container} | ||
id="workspace-settings" | ||
id="workspace-selection-dialog" |
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 like how you renamed this to be more accurate
@ggeisler The
ListItemText
component provides the possibility to define a primary and a secondary text, that I used. I'm not sure, if the resulting text formatting matches the desired one.@jvine Could you attach the workspace type thumbs? I've added some placeholders for now.