-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Three Dot Menu Prototype #3325
Three Dot Menu Prototype #3325
Conversation
- Replace inline styling; - Style for c-menu `__section-separator` and `__section-hint` refined;
- Add new `icon-3-dots` glyph;
- Add icomoon config JSON file;
- Add new `icon-3-dots` glyph;
- Add icomoon config JSON file;
- Grid on, grid off and camera;
- Merge in `add-glyphs-082020`;
- Initial styling and hover behavior for Layout frame controls; - Defined default color for c-icon-buttons; - Changed buttons from `c-button` to `c-icon-button`;
- Make button labels hide/show based on frame size in Layout;
- Changed Snapshot-related buttons and menus to use `icon-camera`; - Normalized padding for c-icon-buttons; - Added a CSS class `c-so-view--<domainObject.type>` to allow sub-layouts with hidden frames to completely hide their headers and buttons - this is needed to avoid overlap collisions with further sub-objects; - Changed button styling in main view to be more in line with 'iconic' approach used elsewhere, enabled button labels where applicable; - Better, more consistent hover approach for `c-button` and `c-icon-button` controls; - Changed Snow theme constant hover `filter` value for better color matching; - Fixed `c-object-label` type-icon opacity; - Changed Snow theme constant for object name to fix inline editing of object name being too dark;
- Fixed button title;
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 super cool. This is going to make the user experience SO much nicer, awesome work both of you.
@deeptailor I have some ideas on ways we might be able to simplify the API a little from the developer's perspective. Interested to hear your thoughts.
- It would be great if there was just one way of registering an action, irrespective of whether it's an object action or a view action (because it could be both):
openmct.actions.register(actionDefinition);
The appliesTo
method would then have the object path and view context passed to it:
appliesTo(objectPath, viewContext) {
}
- We should try to find a way of ensuring that views themselves do not have any responsibility for the lifecycle of actions. It will lead to memory leaks.
One way to do this is to have actions registered once, by the plugin, rather than the view. The view would just hide/show enable/disable the actions as needed.
eg.
// Returns an `ActionCollection` that is scoped to this view instance
let actionsForView = openmct.actions.get(objectPath, viewContext);
actionsForView.disable(['export-marked-rows']);
actionsForView.enable(['unmark-all-rows']);
actionsForView.hide(['expand-columns']);
actionsForView.show(['autosize-columns']);
The object frame could then use the same .get()
function to get an ActionCollection
:
let actionCollectionForView = openmct.actions.get(objectPath, viewContext);
let listOfActions = actionCollectionForView.list();
let statusBarActions = listOfActions.filter(action => action.showInStatusBar);
The disable
, enable
, hide
, show
functions could then trigger an event on the actionCollection
eg.
actionCollection.view.on('change', (updatedListOfActions) => { ... });
The object frame would need to clean up this listener, but that's in platform code (ObjectFrame.vue
), view developers would not have to deal with cleaning it up.
- Merge latest master, fix conflicts;
* wip * simplifying class applications * add status to tabs view * add tests for status API * fix lint errors * fix style application in telemetry vue * CSS and markup refactoring to support addition of 'suspect' telemetry (#3499) * CSS and markup refactoring to support addition of 'suspect' telemetry - Significant refactoring of CSS classing: `is-missing` is now `is-status--missing` and `is-missing__indicator` is now simply `is-status__indicator`, allowing the wrapping `is-missing--*` class to control what is displayed; - New SCSS mixin @isStatus, and changes to mixin @isMissing to support new `is-status--suspect` class; - Changed titling for missing objects from 'This item is missing' to 'This item is missing or suspect'. **IMPORTANT NOTE** This is temporary and should be replaced with a more robust approach to titling that allows title strings to be defined in configuration and dynamically applied; - Refactored computed property `statusClass` across multiple components to return an empty string when status is undefined - this was previously erroneously returning `is-undefined` in that circumstance; - Removed commented code; * CSS and markup refactoring to support addition of 'suspect' telemetry - Refinements to broaden capability of `is-status*` mixin; * fix lint issues Co-authored-by: Charles Hacskaylo <[email protected]>
- Fix styling for Folder List view;
…into three-dot-menu-proto
…into three-dot-menu-proto
- 'Dim back' look is now specific to `--missing` and `--suspect`; - Wired up styling for `is-status--notebook-default`;
@deeptailor If you can resolve the conflicts I'll merge this today |
Closes #3298 |
Author ChecklistChanges address original issue? Yes |
Reviewer Checklist
|
Overview
__section-separator
and__section-hint
refined;c-button
toc-icon-button
;icon-camera
;c-so-view--<domainObject.type>
to allow sub-layouts with hidden frames to completely hide their headers and buttons - this is needed to avoid overlap collisions with further sub-objects;c-button
andc-icon-button
controls;filter
value for better color matching;c-object-label
type-icon opacity;Todos

- [ ] Some menu actions, while properly disabled in the menu, shouldn't be disabled as buttons. Example: "Unmark All Rows"