Replace lower-right controls with a full status bar (#7443)
* Resurrect this branch with an initial commit * Add telemetry to global default items * Add credit progress bar to status bar * Add selection info to status bar * Add help menu to "local" side * Rename statusBarItem utils * Delete LowerRightControls, now unused * fix lints * Update snapshots * Add test-id to network health indicator, which all E2E tests rely on * Update src/components/StatusBar/StatusBar.tsx Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com> * Fix a couple little issues with the e2e tests * Fix gizmo e2e tests (it moved) and network health test (it should not be on home page) * More tweaks to accomodate changes to network health indicator We made use of two test ID's to make Playwright aware of the state, one of which was on the icon. Now that we want to normalize usage of the status bar along a more limited API, that became a not possible. This just tweaks some test code that relied on that fact. * Fix lints * Update snapshots * Re-run CI * Update snapshots * Update snapshots * Test fixes, label logic tweaks * Update snapshots * Update snapshots * Fix up last few tests hopefully. Relative path syntax failed on windows * Relative paths are behaving badly on Windows, use the old code here * Update snapshots * Update snapshots * Tweak y-value to work on all platforms, ubuntu didn't like 438 * Fix tooltip and popover alignment on NetworkMachineIndicator * Remove dire warning comment * Update src/components/StatusBar/defaultStatusBarItems.tsx Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com> * @lee-at-zoo-corp feedback, pull hooks out of UI code * Re-run CI --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
This commit is contained in:
@ -779,3 +779,27 @@ export function updateSelections(
|
||||
otherSelections: prevSelectionRanges.otherSelections,
|
||||
}
|
||||
}
|
||||
|
||||
const semanticEntityNames: {
|
||||
[key: string]: Array<Artifact['type'] | 'defaultPlane'>
|
||||
} = {
|
||||
face: ['wall', 'cap'],
|
||||
profile: ['solid2d'],
|
||||
edge: ['segment', 'sweepEdge', 'edgeCutEdge'],
|
||||
point: [],
|
||||
plane: ['defaultPlane'],
|
||||
}
|
||||
|
||||
/** Convert selections to a human-readable format */
|
||||
export function getSemanticSelectionType(selectionType: Artifact['type'][]) {
|
||||
const semanticSelectionType = new Set()
|
||||
for (const type of selectionType) {
|
||||
for (const [entity, entityTypes] of Object.entries(semanticEntityNames)) {
|
||||
if (entityTypes.includes(type)) {
|
||||
semanticSelectionType.add(entity)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return Array.from(semanticSelectionType)
|
||||
}
|
||||
|
Reference in New Issue
Block a user