Repository navigation
Conversation
Switching between one ruler and a ruler per axis, or moving the legend, meant opening Display in the Properties panel and finding the field under More. The bar with the time-range chips now ends in two icon buttons, Rulers and Legend, at every place it is drawn: the tab bar, each plot of the grid, the fullscreen header and a detached window's title bar. Each opens a menu of its setting's choices (All axes / Focused curve; Bottom / Side / Off) with the current one ticked, and a pick writes that plot. The buttons, the Properties fields and the plot= config go through one writer, withPlotLayout, run by the same workbench update as the fields, so the fields, the posted query and a saved view read one value. The choice names live beside it and the fields list them from there. Rulers is still stored only as "focus", the legend through withLegendPlacement. The two buttons take 56 px. In a 590 px panel the bar keeps its controls whole and the tab titles give up the room, as they already did for the range chips.
A right-click in the grid now lists Rulers › (All axes / Focused curve) and Legend › (Bottom / Side / Off) after Reset zoom, each submenu with the plot's current choice ticked. A pick writes through the same withPlotLayout update as the toolbar buttons and the Properties fields; picking the current choice writes nothing. The two entries are point actions of the shared menu registry, placed in the view group and offered only when a tool wires their writers, so Waveform and Correlation are unchanged.
…t-click menu A browser spec drives a three-curve plot through Rulers All → Focused → All and Legend Bottom → Side → Off → Bottom, once with the toolbar buttons and once with the right-click submenus. After each pick it counts the rulers drawn, finds the legend (the table beside or below the plot, or the chart's own legend under the grid) and reads the query posted to the host for rulers= and legend=. It also checks that a second click on a button closes its menu and a third opens it, that the Properties fields read what the buttons wrote, and that in a 590 px panel the buttons and Add plot stay whole in the tab bar and still work.
…k menu The user guide says, where Legend and the ruler settings are described, that both can be switched from the buttons above the plot and from the right-click menu, and that these set the same field as Display. The right-click list in the workbench page names the two submenus Trace adds.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fifth of six; based on [4/6] (
als/legend-focus-fixes).Switching between one ruler and a ruler per axis, or moving the legend, meant opening Display in the Properties panel and finding the field under More. Both are things one changes while looking at the plot.
feat(trace): Rulers and Legend switch from the plot's toolbar
plot=config go through one writer,withPlotLayout, run by the same workbench update as the fields, so the fields, the posted query and a saved view read one value. The choice labels live beside it and the fields list them from there.feat(trace): Rulers and Legend switch from the plot's right-click menu
A right-click in the grid lists Rulers › (All axes / Focused curve) and Legend › (Bottom / Side / Off) after Reset zoom, each with the plot's current choice ticked, writing through the same
withPlotLayout. The two entries are point actions of the shared menu registry in the view group, offered only when a tool wires their writers, so Waveform and Correlation are unchanged.test(trace): rulers and legend switched from the toolbar and the right-click menu
A browser spec drives a three-curve plot through Rulers All → Focused → All and Legend Bottom → Side → Off → Bottom, once by the toolbar buttons and once by the right-click submenus. After each pick it counts the rulers drawn, finds the legend and reads
rulers=andlegend=from the query posted to the host. It also checks that the buttons toggle their menus, that the Properties fields read what the buttons wrote, and that in a 590 px panel the buttons and Add plot stay whole.docs(trace): Rulers and Legend from the plot's buttons and right-click menu
Testing
On this branch's tip with #208's own SDK pin (0.3.1-als.1; the lockfile re-resolved locally, since #208's committed lockfile does not install frozen):
typecheck,lint: pass.vitest run: 5167 tests pass (new cases inLayoutControls,plotView,menu,plot/menus,contextMenu/registry,TraceApp.rangeControlsSites).scripts/check-chrome-literals.mjsfails onsrc/workbench/fields/ColourSwatch.tsx:64(useState('#000000')), on ALS: Trace, Correlation and Waveform on one workbench #208's head as well; not touched here.