Plot upgrades#15
Conversation
- scope explicit card border, shadow, background, and padding to the XRD page - remove classes that forced the literature compare card to render transparent
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8422dcbb0c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| elif has_corrected: | ||
| corrected_range = _corrected_view_y_range(corrected, peak_y) | ||
| if corrected_range is not None: | ||
| fig.update_yaxes(range=corrected_range) |
There was a problem hiding this comment.
Preserve autorange when intermediate XRD traces are shown
This branch forces the y-axis range to corrected-only values whenever corrected data exists, even when show_intermediate_traces is enabled and raw/smoothed/baseline traces are intentionally visible. In runs where raw intensities are much larger than corrected values, toggling intermediate traces on will still clip those visible traces out of view, so the comparison mode does not actually display the data it enables. The corrected-only range override should be skipped when intermediate traces are being shown (or computed from all visible traces).
Useful? React with 👍 / 👎.
| shapes = relayout_data.get("shapes") | ||
| if isinstance(shapes, list): | ||
| return [dict(shape) for shape in shapes if isinstance(shape, dict)] | ||
| return None |
There was a problem hiding this comment.
Retain drawn shapes across non-shape relayout payloads
The relayout parser only returns shapes when relayoutData contains a top-level shapes list; for other valid relayout payloads (for example zoom/pan keys like xaxis.range[0]), it returns None. Since this value is consumed as State during figure rebuilds, any rerender after a non-shape relayout event drops previously drawn annotations, which defeats shape persistence after normal interactions. The parser should preserve the last known shapes instead of treating non-shape relayout payloads as “no shapes.”
Useful? React with 👍 / 👎.
Summary
Testing
Review & merge gates
Risk / rollback