Commit Graph

174 Commits

Author SHA1 Message Date
Andrew Henry
63bf856d89
Enable persistence operations from Object Providers (#3200)
* Implement 'save' method in Object API

* Refactor legacy persistence code to work with new save object API

* Added 'isPersistable' check to object API

* Fixed incompatibility between object API changes and composition policies

* Make save method private

Co-authored-by: Deep Tailor <deep.j.tailor@nasa.gov>
2020-07-17 09:58:03 -07:00
Andrew Henry
7477536478 Disable broken unit tests (#2519)
* Disabling broken unit tests

* Removed legacy RemoveAction
2019-10-10 16:23:29 -07:00
Andrew Henry
d2e2d55caf Bring across fixes for #1468 and #2277 into TCR (#2386) 2019-04-24 16:01:45 -07:00
Andrew Henry
3122168b0e Removed unused legacy code 2018-12-13 17:11:39 -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
Andrew Henry
cbcfd44016 Elements pool and drag drop (#2196)
* Implemented drag-and-drop composition

* Added composition policy for tables

* Reimplemented elements pool in Vue

* No need to resolve all objects on the navigated path

* Only show elements pool in edit mode

* Remove old elements pool

* Updated legacy code to use composition policy API

* Keep object in sync when mutated
2018-10-23 10:52:37 -07:00
Pegah Sarram
d48cc2deee Vue toolbar (#2191)
* Add a toolbar provider for display layout.

* Move toolbar provider to the plugin

* basic toolbar generation

* componentize different toolbar control types

Break toolbar control types down into different parts and provide
a test toolbar generator in index.html that utilizes all the
controls.

* Get the 'Show frame' checkbox working in the toolbar

* - Remove extra listener.
- Display toolbar only when editing.

* Modify the Selection API to set s-selected and s-selected-parent attributes instead of adding to the css class names.

* Move the logic for allowing the toolbar in the edit mode to the provider.

* Use toggle-button component to toggle frame

* Delete old files

* Remove MCTToolbar

* Modify the toggle button component to return the computed value

* Remove reload=true

* Revert to the original setting

* use value from props

* Always update toolbars on edit status change

* restore fixed position bundle

* bring back reload when hmr unavailable
2018-10-11 11:33:33 -07:00
Pete Richards
0d53898af9 Build refactor to webpack (#2139)
* Move to webpack build
* Use webpack for building openmct.  Move SCSS to one folder and load
all core css up front.  Remove bower, begin removing gulp in favor
of npm run.
* Uses eslint instead of jshint and jscs.  Merge style checking rules
into .eshintrc.js, carrying over core parts of crockford style and
our adaptations.  Current code base fails to pass the linter, want
to separate linter changes from fixes to linting rules.
* Support for Vue SFC with example
* Remove outdated examples
* Use HTML loader for html (supports relative imports of resources e.g.
images) and raw-loader for when javascript must be loaded as text.
2018-08-07 14:47:50 -07:00
tobiasbrown
a1d206bfc3 [Remove] Add confirmation dialog (#1870)
* [Remove] Added confirmation dialog before the remove action is performed

Addresses #563
2018-07-27 13:54:41 -07:00
Andrew Henry
433dee0314 Update test specs to use Jasmine 3 (#2089)
* Updated Karma and Jasmine versions

* Added DOMObserver class. Supports promise-based testing of DOM changes

Update asynchronous test specs to use promises or done() instead of waitsFor/runs

* Modified ActionCapability to duplicate context object properties as own properties for better object equality comparisons

* Global find + replace to fix syntax issues

* Fixed various issues caused by non-deterministic runtime order of tests in Jasmine 3. Fixed issues caused by changes to determination of object equality

* Addressed review comments

* Resolved merge conflicts with master

* Fixed style errors

* Use spy.calls.count() instead of manually tracking
2018-06-29 17:32:59 -07:00
Pegah Sarram
73e38f1955 [Toolbar] Implement a public API for adding toolbars (#1908)
* [API] Implement a toolbar registry and a plugin to allow providing a toolbar for a selected object.
* Modify the mct-toolbar directive to get the toolbar structure from a provider based on selection.
* Implements the layout toolbar in the layout bundle
2018-06-27 13:30:01 -07:00
Nick Weingartner
c55eaeb193 [Copyright] Update copyright year across platform code references
Fixes #2034.
2018-05-14 15:46:17 -07:00
Pegah Sarram
75ae5ab3bb [Toolbar] set selection initially in fixed controller and toolbar... (#1994)
* [Toolbar] set selection initially in fixed controller and toolbar...

... to make the add button appear in the toolbar when a fixed position is created.

Remove selection change listener on destroy.

Start a digest cycle when handling selection in toolbar to avoid delays in toolbar.

Fixes #1991, #1987

* fixed checkstyle and lint errors

* Fix tests

* Update comment
2018-04-20 08:45:29 -07:00
Pegah Sarram
6145843e86
[Inspector] Add check to prevent race condition before setting the scope composition. (#1931)
Fixes #1918
2018-02-28 13:38:00 -08:00
Pegah Sarram
e5d869f01e [Layout] Select the fixed position view only if the parent is not selected.
Also, add mutation listener if domain object is defined to fix the TypeError.

Fixes # 1909 and #1912
2018-02-13 13:23:49 -08:00
Pegah Sarram
d4e3e6689c [Inspector] Listen for mutation and refresh composition
...so that elements pool is updated when selected object's composition changes. Fixes #1869
2018-02-12 10:49:56 -08:00
Deep Tailor
557cd91b21 fix tests 2018-01-04 12:56:57 -08:00
Pegah Sarram
425655bae0 [Layout] Support sub-object selection in layout (#1811)
Updates to sub object selection, first cut of selection APIs.

* [API] Add inspector view registry to register inspector view providers and show a view in the inspector.

[API] Modify the selection API to register the click event and handle the event. The API will add a class to the selected object and the immediate parent of the selected object.

[Directive] Implemenet mct-selectable directive for making an element selectable.

[Layout] Update the layout controller to use the Selection API. Also, add double click gesture to allow drilling into a selected object.

Populate the Elements pool with contained elements of the selected object. Update toolbar and inspector to listen for the changes in selection.

* [Frontend] Mods to markup and CSS for sub-object selection

* MCTSelectable allows selection in initialization, use to select on navigation

[Frontend] Show grid in first nested layout, hide from deeper nesting. Only show grids when applicable to relative selection.

* Fix checkstyle and lint errors

* Bring back the change that made mct-init-select work

* [Inspector] Make sure the right content is displayed based on whether a view provider exists or not.

* Only show table options when editing

* Make reviewers' requested changes

* Fix broken tests

* [Frontend] Cleanups and tweaks

Fixes #1811
- Cleanups between frame, editor and selecting.scss;
- Hover and selected borders visually pumped up a bit;
- Solid borders on hover and selecting when browsing;
- Dashed borders for layouts when editing;
- Fixed cursor to only show move capability when
element is selected;

* [Frontend] Tweaks to frame.no-frame layout

Fixes #1811
- Margin set to 0;
- Overflow set to hidden;

* [Frontend] Fixed position items border width fixed

Fixes #1811
- Set to 1px;

* Add tests for inspector controller and fix broken tests. Clean up code.

* [Fixed Position] Stop event propagation on click handlers in fixed position to avoid the event reaching the selection click handlers which caused issues with toolbar and selection."

* Fix tests

* Add tests

* Add test

* Remove element from document
2017-12-07 13:04:46 -08:00
Deep Tailor
550e7a15e6 [persistence] fix for issue #1593
prevent EditorCapability#finish from calling transactionservice#cancel when transactionService was not active - leading to console error everytime user would leave edit mode

Add tests for changes made and also to check for return type in either case (isActive or not)
2017-11-21 12:07:59 -08:00
Andrew Henry
ec4fe8efb3 Merge pull request #1518 from nasa/copyright-1517
[Licenses] Update copyright year to 2017
2017-04-23 17:22:01 -07:00
Victor Woeltjen
185567cf29 [Licenses] Update copyright year to 2017
Fixes #1517
2017-04-05 14:52:46 -07:00
Henry
4e457f1cf0 Fixed failing tests, and added new tests 2017-03-27 11:15:27 -07:00
Andrew Henry
f7ff5af60b Merge pull request #1448 from nasa/update-composition-policy
Update composition policy
2017-02-21 17:18:59 -08:00
Pete Richards
2a10a2cae2 Update specs to match composition policies 2017-02-21 15:14:35 -08:00
Pete Richards
aaedf5d576 cssclass is now cssClass
Make property name consistent with standard camelCase naming.
2017-02-21 11:14:46 -08:00
Pete Richards
a768b12985 [Edit] Set key on represent
Set key on represent so that commit function can properly persist
configuration per object type.  Add tests to EditRepresenter

Fixes https://github.com/nasa/openmct/issues/1367
2016-12-23 11:22:29 -08:00
Pete Richards
60d1b73160 Update tests and correct style
Update tests to reflect new functionality.

Closes https://github.com/nasa/openmct/issues/1360
2016-12-20 16:49:13 -08:00
Pete Richards
daa71c4f69 [Navigation] remove mct-before-unload
Remove mct-before-unload, and move the functionality to the navigation
service.  The navigation service considers "unload" to be a navigation
event and prompts in much the same way as it would before any other
navigation event.

https://github.com/nasa/openmct/issues/1360
2016-12-20 16:43:23 -08:00
Alex M
d99b4d35ab [Failing Test] Mock cloned object in SaveAs spec 2016-12-20 12:41:58 +02:00
Bogdan Alexandru Marginean
532f7a76f9 [Edit] Add notifications to Save & SaveAs (#1258)
* [Edit] Added notifications to SaveAsAction

* [Edit] Added notifications to SaveAction

* [Edit] Update SaveAsActionSpec

* [Edit] No error notif when user cancels SaveAs
2016-12-19 10:59:26 -08:00
Victor Woeltjen
1a88c9a651 Merge remote-tracking branch 'origin/master' into persist-on-mutation-825 2016-10-07 11:27:58 -07:00
Henry
275dda820b Merge branch 'mct588comm' of https://github.com/BogdanAlexandru/openmct into BogdanAlexandru-mct588comm 2016-09-22 17:33:42 -07:00
Henry
3548cde9c4 [Edit Mode] Fixed issue with save dialog not being displayed for new objects after mutation. Fixes 1080 2016-09-21 16:12:09 -07:00
Alex M
0c27a5f361 [Edit] Remove CreationService dep from SaveAs 2016-09-19 23:52:30 +03:00
Alex M
e08704e6d3 [Edit] Make checkstyle happy 2016-09-19 20:39:54 +03:00
Alex M
b50278e92f [Edit] Remove mocked unused UrlService 2016-09-19 20:22:46 +03:00
Alex M
2a2e9ef99d [Edit] Make linter happy 2016-09-16 03:24:00 +03:00
Alex M
1446b16e77 [Edit] Using spy objects as save action mocks 2016-09-16 03:15:10 +03:00
Alex M
f03003b366 [Edit] Fix CreateActionSpec 2016-09-15 23:18:53 +03:00
Alex M
d1f67fd8b9 [Edit] Introduce dropdown Save menu
And fix style issues in SaveAsActionSpec
2016-09-15 22:40:02 +03:00
Alex M
31ee92b711 [Edit] Remove editor.cancel from SaveActionSpec 2016-09-15 20:39:02 +03:00
Alex M
1ea7fa3084 [Edit] SaveAsAction tests cover save and finish 2016-09-15 20:28:29 +03:00
Alex M
0be84a4e51 [Edit] CreateAction closes editor after save 2016-09-13 23:59:28 +03:00
Alex M
4382745012 [Edit] Final two actions now use finish() 2016-09-13 22:35:11 +03:00
Alex M
79b16ddda6 [Edit] SaveAs now calls finish() 2016-09-13 21:24:20 +03:00
Alex M
3dee082141 [Edit] Add reason for redundant mocks 2016-09-03 19:02:05 +03:00
Alex M
7d52d348b2 [Edit] Fix style issues 2016-09-03 18:33:27 +03:00
Alex M
ded52b8d19 [Edit] Rename cancel() to finish() 2016-09-03 17:55:05 +03:00
Alex M
ab4ce0caba [Edit] Introduced SaveAndStopEditingAction
It replaces SaveAction in the bundle.
2016-09-03 17:55:04 +03:00
Alex M
90c13a3959 [Edit] EditorCapability continues edit on save 2016-09-03 17:55:04 +03:00