- 
                Notifications
    
You must be signed in to change notification settings  - Fork 362
 
Improve the VS Code sidebar UI #6380
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
Conversation
          
 Can we just use the Dart Icon? @InMatrix @Nancyhu2023 should we create an icon specific to DevTools (like the Dart icon with a wrench or something?)  | 
    
| return TableRow( | ||
| children: [ | ||
| Text( | ||
| '${session.name} (${session.flutterMode})', | 
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.
instead of showing null as a literal, can we just show 'Session starting...' until we know we have non null values for both of these?
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 dropped the mode if it's null. I think if we want to show explicitly that it's starting, we should tweak the API to make a more explicit status rather than using this field to infer it (I think they're equivalent but it feels like a slightly weird assumption).
| children: [ | ||
| Text( | ||
| '${session.name} (${session.flutterMode})', | ||
| style: Theme.of(context).textTheme.titleSmall, | 
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 about Theme.of(context).regularTextStyle here instead?
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.
Done! Although I'm not actually sure what the difference is between that and just not having it. When I add that line and/or comment it out, the spacing of some of the letters changes very slightly when I hot reload, but only for one session and not the other. Seems almost like some rounding issue:
textstyle.mp4
| // TODO(dantup): Ensure the order matches the DevTools tab bar (if | ||
| // possible, share this order). | 
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.
Checkout the ScreenMetaData enum in screen.dart. We can try to match the order there. If we do this, we should also add a test to visible_screens_test.dart that ensures that the order of DevTools screens matches the order specified in the enum.
| return Directionality( | ||
| textDirection: reversedDirection, | 
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.
why do we need this directionality widget?
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.
| style: | ||
| TextStyle(color: isSelected ? colorScheme.onPrimary : null), | 
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.
can we do Theme.of(context).regularTextStyle.copyWith(color: ...)?
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.
| textDirection: reversedDirection, | ||
| // Reverse the direction so the menu is anchored on the far side and | ||
| // expands in the opposite direction with the icons on the right. | ||
| textDirection: normalDirection, | 
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.
if we want this revered, shouldn't this be reversedDirection?
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.
Ug sorry, this was an accidental change after I took the screenshot above. Fixed.
| for (final device in devices) | ||
| _createDeviceRow( | ||
| colorScheme, | ||
| Theme.of(context), | 
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.
store theme in a var at the top of the build method so we don't have to call Theme.of(context) more than once
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.
Done!
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.
This is looking good! one comment then lgtm
          
 How about the construction icon from Google Symbols and Icons? https://fonts.gstatic.com/s/i/short-term/release/googlesymbols/construction/default/24px.svg.  
       | 
    
| 
           I've switched to the construction icon for now, but can easily change if we find something better (or DevTools gets a specific icon).  | 
    




Some tweaks to the sidebar UI. Currently looks like this:
sidebar2.mp4
Things that still need doing:
(null)for mode while starting@kenzieschmoll @anderdobo