-
Notifications
You must be signed in to change notification settings - Fork 40
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
Use new Fluent-based Resource Tree for all environments #1841
Conversation
Now ready for review! |
47ae7b1
to
074cbe4
Compare
It looks a little bit bigger indeed, we should make sure the font sizes fit together with the new fluent documents list: #1770, since we want to get both in right after Build? |
@jawelton74 @sevoku It's not intentional, I can patch it up. It's worth noting there is a full redesign of the resource tree on the queue as well (which should be consistent with the document list view), but a simple font-size fix-up is definitely worth doing before this merges. Once both new views have landed, the redesign work should help get things more consistent (using shared stylings, etc.), but it's absolutely possible to make some quick patches now before this lands to make things less jarring. |
Looking at the new Fluent Resource Tree, I think it actually matches the font sizes being used here (which makes some sense, since they are both mostly using Fluent's default styling. I'm going to merge the two branches locally and do some testing (both in Hosted/Portal and Fabric) to confirm that, but I think that with both of these changes landed, the font sizes will line up. Screenshots to come shortly! |
Ok, so there is still a discrepancy. If we just merge #1770 and this PR (unmodified), there's a fairly noticable size difference between Tree items and Table items: So, I'm sizing the Tree down to the This does make the tree a little smaller than it currently is on Fabric, which I could undo with a few simple And with this change and no I'm inclined to leave it that way, since we're doing more redesign passes on this soon. So, to summarize:
|
I vote to leave it that way as well. We keep the differences between Azure and Fabric to a minimum (ie the colors) to make it clear it's the same Data Explorer and don't confuse the customer. And it's easier to maintain. |
… TreeNodeComponent
c3ce884
to
1932056
Compare
Update! Rebased on
So, in order to do that, I've added code to duplicate the actions menu into the context menu for each tree node item. This means you can right-click on a tree node to get the same menu as you would when clicking the "..." button. However, in order to make this work, I had to remove a global binding to So, there are two ways forward:
I have chosen Option 1 above but can pivot to Option 2 if desired. I think Option 1 is the least surprising behavior to the user. Why does calling
|
I also vote for Option 1: the context menu has useful functionality. It would be detrimental to the UX to prevent the user from accessing them, IMHO (and personally, I am a fan of the "Inspect" option which I can finally use on DE :)). |
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.
LGTM and +1 for context menu Option 1
Preview this branch
This is part of our redesign work. At @languy 's suggestion, I decided it would be useful if we unified our Resource Tree components before redesigning the tree itself. That way we have a consistent view across all our environments.
When hosted in Fabric, we use a new "ResourceTree2" component that is based on Fluent UI 9. Currently, other environments (https://cosmos.azure.com, Portal, Emulator, etc.) all use the existing ResourceTree based on custom UI logic and Fluent UI 8.
This PR unifies all the environments to the newer ResourceTree2 component. I also removed the ResourceTokenTree and rolled its functionality into the tree-building logic that is used by ResourceTree2.
I then removed the old ResourceTree and renamed ResourceTree2 to just "ResourceTree". I wanted to do similar for the "TreeComponent" stuff it uses, but there are some lingering elements of it (see below) so for now I just renamed "TreeComponent" to "LegacyTreeComponent" and "TreeNode2Component" to "TreeNodeComponent" in preparation for removing the "legacy" tree components.
So, in summary:
NOTE: The renames are relatively isolated and can be undone or changed if folks have other preferences for how we do that!
I do have one open question: The
ResourceTreeAdaptor
component appears to be largely unused. It's only really used via theenableKoResourceTree
feature flag, and appears to just be a left-over "backup" option to go back to the previous-generation knockout-based resource tree. I did also find reference to it in Notebooks-related components but I believe those are being deprecated/removed soon?I've validated a number of scenarios here, comparing the new tree behavior with the existing tree:
generateResourceToken.js
helper as part of this, to make it a little easier to use)