Commit Graph

5498 Commits

Author SHA1 Message Date
Deep Tailor
ac11f898d4 A bunch of fixes for TCR (#2250)
* fix add links by drag and drop

* fix dialog component logging errors

* fix search component errors

* fix sort

* remove unused entrydnd file

* remove unnecessary console logs

* fix preview action in embed dropdown, which was throwing a type error

* invoke PreviewAction once in NotebookController and pass into git add -a

* add navigation capability to embeds, and a bunch of cleanup

* code cleanup and avoid calling dismiss twice on overlay destroy, which was throwing a DOM error. Calling code should dismiss the overlay

* only show elements pool if domainObject has composition

* fix error in inspector when no selection is present

* wire up object view expand button

* listen to composition#remove in TabsView

* make reviewer requested changes

* make reviewer requested changes, and fix for an edge case where removed tab is at the end of the array and currentTab is not set properly

* remove array wrapping dynamic classes in embed.html

* add title='View Large' to expand button

* change model variable to domainObject in tabs.vue

* dismiss top level overlay when esc is pressed (only if overlay is dismissable)

* fix link navigation from embeds

* use positive flag dismissable instead of negative notDismissable for overlays

* make overlays dismissable by default, unless set to false
2019-01-24 16:23:50 -08:00
Pegah Sarram
dd31de6935 Add form to display layout type to allow setting grid size. Also fix generator's form. (#2274) 2019-01-24 16:03:09 -08:00
Pegah Sarram
9e811e722f [Display Layout] support ordering items (#2266)
* Add a toolbar menu for changing the display order of items.

* - Wire up orderItem
- Modify the toolbar API to support function as alternative for property path.
2019-01-23 10:51:29 -08:00
Charles Hacskaylo
8ef53d85c4 R&I Layout editing mods (#2256)
* Layout mods for sub object editing without is-drilled-in
* Remove drilled-in logic
2019-01-22 11:52:56 -08:00
Andrew Henry
abcc5cb023 Implemented go to parent (#2264) 2019-01-17 16:32:12 -08:00
Pegah Sarram
931871ff95 [Display Layout] Snap to grid toolbar toggle button (#2262)
* Add a  button in the toolbar to toggle snapp to grid.

* Convert item's coordinates and size from grid unit to pixels depending on useGrid value.

* Rename selectionListener to removeSelectionListener
2019-01-17 09:24:59 -08:00
Andrew Henry
6b1e8862ef Tables composition error (#2260)
* Removed debubgging statement

* Change order of mutation events so that composition handlers are working with latest object version.

* Remove suppression of mutation event

* Minor code reformatting
2019-01-15 09:55:22 -08:00
Pete Richards
00ce246fc5
Merge pull request #2261 from nasa/object-path-on-drop
Change domain-object event transfer data to domain-object-path
2019-01-15 09:48:32 -08:00
Andrew Henry
c0c7d96429 Change domain-object event transfer data to domain-object-path 2019-01-14 12:07:31 -08:00
Andrew Henry
92b2582d0d Preview instead of navigate in edit mode + highlight navigated object (#2252)
* Preview instead of navigate when in edit mode.

* Prevent preview of navigated object

* Removed trailing comma

* Observe navigation from tree items instead of mct-tree

* Cleanup of redundant code

* .is-selected -> .is-navigated-object
2019-01-11 11:21:52 -08:00
Andrew Henry
4084a1ac86 Drag and drop fixes (#2249)
* Drag-drop edit mode from capture handler. Drag-drop composition from bubble handler. Check composability on drag start

* Show drop hints without being in edit mode.

* Don't serialize objects twice on drag
2019-01-11 11:20:57 -08:00
Charles Hacskaylo
cb1a1c2616 R&I Clock timer fixes (#2254)
* Clocks and timers styling WIP

- Markup, new styles;
- Renamed _legacy-plots.scss > _legacy;
- New $colorBodyFgEm constants - theme files all updated;

* Clocks and timers styling complete

* Styles clean up

- Moved legacy styles out of _global into _legacy.scss;
2018-12-24 14:02:37 -08:00
Deep Tailor
ce6c1f173e Lad table vue (#2231)
* working telemetry subs

* Styling for LAD table

- Fixed markup;
- Corrected icon, added description;
- Expand c-table styles slightly, moved some definitions into
c-telemetry-table;

* add LADTableSummary

* change function names

* make reviewer requested changes

* add lad table headers in sets

* make column widths fixed

* handle composition remove in sets and tables

* finish updateTimeSystem

* add correct support for limits

* LAD Table and Table Set styling

- Removed fixed table layout;
- Col widths set to 33% for now;
- New c-lad-table class and styling;
- New __group-header class added;
- All themes updated with __group-header style colors;

* make reviewer requested changes

* use lodash findIndex
2018-12-20 13:18:22 -08:00
Charles Hacskaylo
30a4888363 R&I Misc UI 3 (#2253)
* Limits-related changes; WIP

- Renamed CSS classes: `s-limit-*` > `is-limit--*`;
- Removed load of legacy _status.scss and added new _status.scss file;
- Minor re-org of limit/status constants in theme files;
- Limit colors in theme constants all updated;

* Fixes for s-selected always displaying the move cursor

- Mod s-selected;
- Reinstitute `.is-moveable` class;

* Layout-related cleanup and refinements

- LineView cleaned up;
- Selection, hover, etc. classes for c-frame cleaned up;
- Constant names normalized, theme files updated;

* Fixes for editing plot options

- Color palette now more flexible;
- Styles for color palette button refined;
- c-input--flex added for more flexible inputs;

* Various swatch-related changes

- Swatch refinements, new .c-click-swatch class;
- Added .c-click-icon--major modifier style, applied in markup;

* Local controls class application and behavior cleanup

- Remmoved .has-local-controls from selected markup;
- Refined CSS selector for better hover behavior;

* Misc UI tweaks

- click-icon--major in Notebook;
- .test mixin improved;

* Update _constants-espresso.scss

* Update _constants-maelstrom.scss
2018-12-20 13:17:44 -08:00
Deep Tailor
b0917a9866 Pending fixes for Grid and List Folder views (#2247)
* fix view names, and persist sort order across list views by persisting in local storage

* use keystring as key

* add openmct namespace to localstorage persisted listview-sort-order to avoid name collision, rename key in composition-loader to objectKeyString
2018-12-20 13:16:23 -08:00
Pegah Sarram
464e5de947 [Display Layout] Add delete button (#2251)
* Add delete button in the toolbar for removing items

* Mutate composition if there are no telemetry objects. Select the parent layout after deleting an item.

* Saving work

* Watch for index in the components and update it in the context.

* Select the parent after a composition is removed.

* Address reviewer's feedback.
- Rename mutatComposition() to removeFromComposition().
- Inline logic for filtering composition
- Use separate branches for each item type in trackItem().

* Address reviewer's requested changes
2018-12-20 13:15:23 -08:00
Pete Richards
47a07da17d
Merge pull request #2246 from nasa/conditional-edit-button
Conditional edit button
2018-12-20 09:37:43 -08:00
Charles Hacskaylo
ec4c443299 Misc ui 2 (#2248)
* Create button disabled when editing
* New disabled mixin;
* Tree styling
* Fixed icons for fullscreen toggle button
* Local controls fixed for Imagery and Plots
* Range control styling updated;
* Plot styling, significant mods
* Disclosure controls improved;
* New _legacy-plots.scss file added, no longer loads legacy plot SCSS
files;
* Removed 12px crosshair cursor in legend hover;
* Inspector tree styling in plot options
* Fix z-indexing related to Overlays
2018-12-18 11:07:09 -08:00
Andrew Henry
3122168b0e Removed unused legacy code 2018-12-13 17:11:39 -08:00
Andrew Henry
da3af4b3db Merged from TCR 2018-12-13 15:36:13 -08:00
Pete Richards
850fa28bf6 Update component locations 2018-12-13 09:45:50 -08:00
Pete Richards
270684c5fd
Merge pull request #2244 from nasa/component-reorg
Reorganize components, create ObjectFrame
2018-12-13 09:19:40 -08:00
Pete Richards
afa1589cb5 Reorganize components, create ObjectFrame 2018-12-13 09:16:42 -08:00
Deep Tailor
18a94d938f Notebook Snapshot and Annotate (#2240)
Notebook Snapshots and Annotations from new Browse Bar
2018-12-12 18:57:45 -08:00
Andrew Henry
d026bc2134 Show edit only if view is editable. Rename editable to canEdit 2018-12-12 17:17:49 -08:00
Pete Richards
c0b7276787 tree and toolbar fixes (#2241)
[tree] fixes warning from viewControl about improper mutation in child component
[tree] show links in tree
[toolbar] close open menu when clicking on another menu.
2018-12-12 10:58:36 -08:00
Charles Hacskaylo
bb8342f62b Style updates (#2243)
* Create button disabled when editing

- New disabled mixin;
- Selector def for .is-editing .c-create-button;

* Symbolsfont install generation, Elements pool

- Moved font src statement to prevent genning of symbolsfont in wrong
directory locations;
- Elements pool styling WIP, todo: hover item styles, class naming;

* Tree styling

- Hover behavior refined;
- Styling for .is-selected state;

* Fixed icons for fullscreen toggle button

* Tree-related styling for is-selected, is-being-edited
2018-12-11 19:29:29 -08:00
Andrew Henry
0d8dad1559 update preview action to use new action registry
* Support category arrays for legacy actions

* Fixed object path listener. Removed old context menus

* Removed old fullscreen action and Screenfull dependency

* Restore confirmation dialog on remove

* Restored tests

* Remove unused legacy policies

* WIP re-implementation of Preview action

* WIP for Charles to take a look at flex issues

* Disable legacy preview action

* Style and markup fixes for new Preview

- LegacyViewProvider modded to wrap legacy elements in .u-contents div;
- Added selector that automatically defines display: contents on
`no-class` divs injected into __object-view;
- Unit tested with legacy and new components (telem tables, plot view,
Notebook, etc.)

* Tweak z-indexes, fix open in new tab action, add 'done' button

* Removed legacy action

* reuse contextMenuDropDown component
2018-12-11 19:25:20 -08:00
Pegah Sarram
c1ef701eb2 merge display layout view config with components, add line view.
* Hacky WIP

* WIP

* check for 'domainobject' in data transfer

* Metadata manager can return default display value

* Refactor subobject and telemetry views to use layout frame

* Use data domainObject

* Get metadata for selected object.

* Don't inject lodash via vue

* move selection to specific layout types

* restore toolbar functionality

* Support creating line

* Add controls for setting x, y, x2 and y2 for lines from the toolbar.

* Initial attempt at resizing lines

* Check for duplicate panel

* line resize handles working

* Get Text and Box elements working.

* Refactor image view to use layout frame

* Fix drill in

* Check for object before accessing the identifier to avoid type error.

* Add inspectable class if item is subobject or telemetry view.

* Delete unused files

* remove unused imports

* Fix typos

* Fix cssClass and objectPath

* object can be undefined so check for it not being undefined before adding a listener.

* Set cssClass when domain object is available

* Get user input for text and image in the toolbar when adding element.
2018-12-11 11:28:16 -08:00
Deep Tailor
c6a181a2e7 Notebook bug fixes from Testathon - 12/4/2018 (#2236)
* fix add links by drag and drop

* fix dialog component logging errors

* fix search component errors

* fix sort

* remove unused entrydnd file

* remove unnecessary console logs
2018-12-07 14:50:14 -08:00
Pegah Sarram
981392ea07 Define metadata when component is created. (#2237) 2018-12-07 10:34:31 -08:00
Charles Hacskaylo
5928a102a6 Theme refactoring (#2234)
* Theme refactoring

- New hero, header and body font mixins added to theme files;
- Mods to body, griditem, frames, browsebar, etc. to use new font
mixins;
- Moved symbolsfont definition into _constants.scss;

* Tweak - make SubobjectView use header font;

* Add new theme 'maelstrom';

* Add comment

* Remove deprecated .svg and .eot symbol font files
2018-12-07 10:26:54 -08:00
Andrew Henry
c748569433 Address testathon issues relating to context menu (#2235)
* Support category arrays for legacy actions

* Fixed object path listener. Removed old context menus

* Removed old fullscreen action and Screenfull dependency

* Restore confirmation dialog on remove

* Restored tests

* Remove unused legacy policies
2018-12-07 10:15:11 -08:00
Deep Tailor
a87fc51fbb Flexible Layout Refactor (#2223)
* only store identifiers in frames

* move drop hints outside frame

* fix resizing

* fix drag and drop frames

* fix reordering of columns

* multiple improvements

* fix styling for drop hint in empty container

* fix frame reorder in same column

* better drop target show logic

* better frame drop to logic

* fix container reordering

* add uuids for frames and containers to prevent clashing

* toolbar updates

* use shared subobject component to ease styling

* add type cssClass to subobject component header, and delete frame header vue file

* add context menu in subobject views

* change height and width to size for both frames and containers

* remove uneccesary methods from resizeHanfle and inline logic instead

* remove left click logic from context-menu mixin, add a click handler to dropDownContextMenu to show menu

* make a mixin to listen for isEditing

* encapsulate drop hints, and pass allowDrop logic to check if drop hint is valid

* use event.dataTransfer instead of vue events for container reordering

* remove vue events for frame dnd and use html events

* better implementation of toolbar

* remove unused event

* fix container resizing when adding new container

* make reviewer requested changes

* add containerId to event vs having a JSON object

* watch domainObject from flexible layouts and pass down to components

* change domainObject directly on add Container

* update domainObject on change, and cahnge toolBarProvider to function that returns an object

* fix plugin

* set domainObject as data property in felxibleLayouts

* use class instead of inline styles

* Cleanup code

inline this.$el for components that measure their own size
replace snapToPercentage with Math.round
inject object as layoutObject, not dObject.

* reuse sizing logic between frames and containers

* clean up handlers

split handlers for createFrame and moveFrame events in container.
reorganize methods for each to clarify how they operate.

* ObjectView only stops propagation when it handles event

* use ids in toolbar to ensure correct items are mutated

Because index may change due to drag and drop events,
deleteFrame and deleteContainer should operate using identifiers
instead of index.

Also, generate path for hasFrame using indexes when object is
selected, otherwise hasFrame may refer to the incorrect path.
2018-12-07 09:34:33 -08:00
Pegah Sarram
e07cfc9394 Layout drawing (#2232)
* - Show "Add" button in the toolbar when a display layout object is selected.
- Add a flag to object view's show() method to indicate immediate selection of the view. If the view implements getSelectionContext() use it, otherwise set to default context.

* Create a component for each element.

* Saving work

* Add element factory for creating new instances of elements.

* Mutate element when a new one added and get elements when the component is mounted.

* Add create() method for creating a new telemetry and element in their respective view configuration.

* Add some of the toolbar controls for box, text, image and line elements. Also, add X, Y, Width and Height controls for alhpanumeric elements.

* Pass name to addElement as type.

* Add c-frame-inspectable class if item is inspectable.

* Clean up

* Hide frame for summary widgets by default.

* Better styling for editing

- s-selected on shell__main-container;
- Better edit grid coloring for espresso;

* - Update toolbar-button to support dialogs.
- Update toolbar to construct a value object based on form keys if a toolbar item has a dialogi, and mutate the form keys.
- Add toolbar controls for editing text and url for 'Text' and 'Image' elements respectively.

* Editing-related changes

- Removed hard-coded .is-selectable and .is-moveable from
LayoutItem.vue, updates accordingly to _global.scss;
- Theme constants updated;
- TODO: apply changes to Flexible Layouts;

* Better defaults

- Better default grid size and object size;

* - Fix toolbar-input to read value as a number if type is 'number'.
- Remove rawPosition from view configuration and instead get the position and dimensions from the properties (x, y, width and height) directly.
- Set the style property on the view configuration instead of the layout item.
- Move the logic for updating the style to the view configuration.

* Fix default dimensions for telemetry items and subobjects since the default grid size is changed.

* Remove form definition for display layout type.

* Reword the comment

* Let subobject view configuration handle new panel creation.

* Add default grid size back and remove unused code.

* Pass in only the needed method.

* Define default position in case the object is not added via drag 'n drop.
2018-12-04 09:12:45 -08:00
Andrew Henry
32a0baa7a3 Context menu actions (#2229)
* Adding jsdoc to Context Menu Registry

* Remove attachTo function - make context menu gesture a mixin. Update object path when objects change.

* Added context menu from arrow button. Some minor refactoring

* Clarify variable naming

* Moved Context Menu component

* Reorder function definitions

* Addressed code review comments
2018-12-04 09:09:09 -08:00
Pegah Sarram
f06427cb3e Show field name as title. (#2233) 2018-12-04 08:15:33 -08:00
Andrew Henry
9ae4e66c91 Instantiate legacy objects inline 2018-11-23 15:31:38 -08:00
Andrew Henry
eeab6e9bde Do not allow context menu to overrun edge of screen 2018-11-23 15:14:55 -08:00
Andrew Henry
cabc410e0a Fix SaveAs import 2018-11-23 15:13:53 -08:00
Andrew Henry
2dcff00fa7 Added legacy action layer 2018-11-23 11:52:13 -08:00
Andrew Henry
94cdce3551 Support events other than 'contextmenu' 2018-11-23 09:05:01 -08:00
Andrew Henry
a7948ce83e Implemented context menu action registry 2018-11-22 15:53:50 -08:00
Pegah Sarram
74faf1bd48 Create a base view configuration class. (#2225) 2018-11-16 12:56:51 -05:00
Charles Hacskaylo
3e7527d55c Fixes for Flex Layout in TCR (#2221)
- Object view now displays objects;
- FL frame header fixed;
- Fixed grippy look and positioning for now;
2018-11-13 19:02:54 -05:00
charlesh88
9733674d6e Fixed baseline in symbols font 2018-11-10 22:41:38 -08:00
Pete Richards
e05dbadea2 Ensure labels and tree items stay in sync 2018-11-09 11:46:57 -08:00
Pete Richards
bc512f3766 Retrieve latest object before create
Retrieve latest object before creation to ensure we are not
mutating an outdated version.
2018-11-09 11:00:24 -08:00
Andrew Henry
ae51e2e437 Table header columnWidth prop should be number not object 2018-11-09 10:34:15 -08:00
Pete Richards
0e06a7b403 Hide openmct with closures to prevent it becoming reactive 2018-11-09 08:33:50 -08:00