-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
feat: Recent Objects #6103
feat: Recent Objects #6103
Conversation
This reverts commit bb516d6.
This reverts commit 0b2dc1e.
- Now throws an error if `getRelativeObjectPath` is passed a malformed `navigationPath` - If the generated `objectPath` does not contain 'ROOT', add it - Update some comments, fix some types - Make `get` error message a bit more informative
- Adds the ability to pass in a custom objectPath to the ObjectPath component which will override the OriginalPath it displays by default
- Filter out deleted recents on re-render
- Registers/unregisters compositionCollection remove handlers for composable objects in RecentObjects. - Removes items and their children from the RecentObjects list upon deletion.
…s to appear on hover
95% ready for review, have one failing e2e test to fix |
Let's merge this and file a followup for vertical collapse and for the flashing highlight in the tree. |
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.
Looking good @ozyx! I had some review comments
* and registers composition listeners for composable objects. | ||
*/ | ||
getSavedRecentItems() { | ||
const savedRecentsString = localStorage.getItem(LOCAL_STORAGE_KEY__RECENT_OBJECTS); |
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.
Do we want to move any of this to the ObjectAPI?
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.
Good question. We save/load state to localStorage in the same way in mct-tree, so this is certainly mostly boilerplate that can be extracted. I've heard some discussion about revamping localStorage management, not sure if ObjectAPI would be the place though. @akhenry I'm deflecting to you, thoughts?
Either way, feels like something that would warrant its own separate issue/PR
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.
Agree about a separate PR, was mainly curious about architecture here.
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 looks awesome. I made some comments inline. It looks like you can ignore the vue linting props ones. That used to be a warning. Don't know what changed. Code is clean and well organized. Ideally I would like some of this logic, especially the shared logic with the other trees, extracted out of view/vue logic, but that's for another day.
Need to be fixed.
- actions seem broken now (duplicate, move)
Should be fixed
- doesn't react to non router changes (aka editing name from browse bar)
UI observations @charlesh88
- same color highlight may be okay... but the recent items highlight doesn't go away which then makes it harder to distinguish what is selected and what is just highlighted
- it is way more visibly clear and attention drawing than the tree itself. this might be a good thing. just pointing that out
@@ -390,9 +390,9 @@ class ApplicationRouter extends EventEmitter { | |||
* | |||
* @param {string} hash new hash for url | |||
*/ | |||
hashChaged(hash) { | |||
this.emit('change:hash', hash); | |||
hashChanged(hash) { |
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.
👏 👏 👏
- Fixes an issue with calls to `router.navigate()`. It turns out that if the url passed in has query params in it, the navigation becomes unreliable. Will need further investigation, but for now I've updated the usages of that function and left a comment on the method specifying the format of the hash.
- min-height on vertical pane element. - Font-size, margins tightened up and aligned.
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.
really nice job and you fixed all the comments super fast
Closes #6053 #1646
Describe your changes:
Adds a "Recent Objects" draggable pane to the main left pane. Keeps track of the 20 most recently visited objects. Includes but distinguishes between objects and alias by displaying the objects' full paths and whether or not it is an alias. A target button next to each list item will scroll the object into view in the main tree. If an object or alias is deleted, its corresponding entries (and its children) in the Recent Objects list will also be removed.
Also adds the ability to persist the position of any
Pane
with a label attribute. Makes the left pane, inspector pane, and Recent Objects panes' positions persistent.Screen.Recording.2023-01-09.at.9.32.14.AM.mov
TODO:
All Submissions:
Author Checklist
Reviewer Checklist