-
Notifications
You must be signed in to change notification settings - Fork 909
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
Notebook main toolbar additions #10271
Conversation
…y can be implemented with a boolean set to T of F and show labels or shift them into tooltip for accessibility. Updated styles for select boxes. Added toolbar icons to common icon location. Split icon definition for use as masked or background-image.
…into harankin-notebook-ui-toolbar
… theme colors. Simplified icon behavior styles.
…select box border and dropdown arrow. Experimenting with adding masked icon to pseudo element so I can pull out label text from icons.
…into harankin-notebook-ui-toolbar
…side button text. Added icons using this method to respect the color theming system.
…Implemented Underline action. Added custom --wip-- ButtonMenu control, a modified copy of DropDown.
…ed code from new custom control: buttonMneu. Revised icon styles to create a dropdown arrow for buttonMenu.
…ctionViewItem constructor.
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.
Could you please include some screenshots showing this new behavior as well? We already have a number of dropdown implementations so I'm not sure we need another new one vs just extending an existing one to support the new functionality you need.
(and if you could outline what functionality you needed that wasn't supported that'd be helpful too)
src/sql/workbench/contrib/notebook/browser/notebook.component.ts
Outdated
Show resolved
Hide resolved
…he class needs. Corrected style declaration for overriding input box padding. Removed unused notebook color styles. Scoped element styles to the toolbar so others outside the toolbar are not affected.
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.
Let's chat about the icon stuff when you get a chance
…ves some conditionals and CSS classes.
src/sql/workbench/contrib/notebook/browser/notebook.component.ts
Outdated
Show resolved
Hide resolved
src/sql/workbench/contrib/notebook/browser/notebook.component.ts
Outdated
Show resolved
Hide resolved
… notebook toolbar icon spacing. Modified notebook.component contributed actions so that the label text is shifted into the title attribute. Added new icon for Not Trusted toggle.
…into harankin-notebook-ui-toolbar
…into harankin-notebook-ui-toolbar
return new LabeledMenuItemActionItem(action, this.keybindingService, this.contextMenuService, this.notificationService, 'notebook-button'); | ||
|
||
if (action.item.id.includes('jupyter.cmd') && this.previewFeaturesEnabled) { | ||
incomingLabel = action.label; |
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.
Remove the incomingLabel and just flip the two below statements
action.tooltip = action.label;
action.label = '';
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.
Flipped (╯°□°)╯︵ ┻━┻
…d CSS accordingly. Removed unnecessary instance of in-preview class. Fixed code logic that assigns label text to tooltip on incoming contributed action
This PR fixes # (no task assigned)
This PR adds new functionality:
Notebook main toolbar - Created new custom control named:
buttonMenu
, which includesDropdownMenuActionViewItem
-- which is implemented in the dropdown action at the notebook component level. This displays a dropdown at the first item "+ Cell" when user clicks on it. This allows one to add a new cell as code or as markdown.Lastly, the three actions -- expand/collapse cells, clear contents, and trusted/not-trusted were modified to allow one of two presentations: show label beside icon (current behavior in prod code), or suppress label and add label text to icon tooltip for accessibility (new behavior).
Markdown editor toolbar - Added Underline.
More details:
First item used to add cell as code or markdown:
Add cell menu open:
The end goal here will be use styled elements to replace the OS rendered open menu for this item and all other Notebook UI that opens a menu.
As for functionality:
Here's a snap fo the comp: