Skip to content

Conversation

@mtrezza
Copy link
Member

@mtrezza mtrezza commented Jan 24, 2026

Pull Request

Summary by CodeRabbit

  • New Features

    • Added keyboard shortcuts: Cmd/Ctrl+E to edit the selected element and Cmd/Ctrl+R to reload all elements.
  • Style

    • Canvas background changed to light gray.
    • Element chrome simplified; resize restricted to the bottom-right corner and handles repositioned for clearer interaction.
    • Refresh buttons hidden by default and fade in on element hover.
    • Static text vertically centered and layout improved.

✏️ Tip: You can customize this high-level summary in your review settings.

@parse-github-assistant
Copy link

parse-github-assistant bot commented Jan 24, 2026

🚀 Thanks for opening this pull request!

@parseplatformorg
Copy link
Contributor

parseplatformorg commented Jan 24, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@coderabbitai
Copy link

coderabbitai bot commented Jan 24, 2026

📝 Walkthrough

Walkthrough

Adds a selection wrapper class and restricts resize handles on canvas elements; refactors element styling and refresh-button hover behavior; changes canvas background color; and introduces Cmd/Ctrl+E and Cmd/Ctrl+R global shortcuts for editing and reloading dashboard elements.

Changes

Cohort / File(s) Summary
Canvas wrapper & Rnd
src/dashboard/Data/CustomDashboard/CanvasElement.react.js
Adds canvasElementWrapper class to Rnd wrapper when selected; disables most resize directions leaving only bottom-right; updates resize-handle class mapping.
Canvas element styles
src/dashboard/Data/CustomDashboard/CanvasElement.scss
Removes visual chrome from .canvasElement, moves border/hover/selected visuals into .elementContent, adjusts .dragHandle positioning, and introduces .resizeHandleVisible styling.
Dashboard shortcuts & hints
src/dashboard/Data/CustomDashboard/CustomDashboard.react.js
Adds global shortcuts: Cmd/Ctrl+E to edit selected element (when focus not in editable) and Cmd/Ctrl+R to reload all element data; updates UI hint text/title for these actions.
Canvas background
src/dashboard/Data/CustomDashboard/CustomDashboard.scss
Changes canvas background from #ffffff to #f5f5f7.
Refresh button visibility
src/dashboard/Data/CustomDashboard/elements/DataTableElement.scss, src/dashboard/Data/CustomDashboard/elements/GraphElement.scss, src/dashboard/Data/CustomDashboard/elements/ViewElement.scss
Sets .refreshButton initial opacity: 0, adds opacity to transitions, and reveals button (opacity: 1) when parent .canvasElementWrapper is hovered.
Static text layout
src/dashboard/Data/CustomDashboard/elements/StaticTextElement.scss
Makes .staticText full-height flex container with vertical centering and top padding.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Browser
    participant CustomDashboard
    participant CanvasElement
    participant DataLoader
    User->>Browser: press Ctrl/Cmd+E or Ctrl/Cmd+R
    Browser->>CustomDashboard: key event handler
    alt Ctrl/Cmd+E (edit) AND selection exists AND focus not editable
        CustomDashboard->>CanvasElement: request enter edit mode
        CanvasElement->>CanvasElement: open inline editor
    else Ctrl/Cmd+R (reload)
        CustomDashboard->>CanvasElement: request reload for each element
        CanvasElement->>DataLoader: fetch/reload element data
        DataLoader-->>CanvasElement: return updated data
        CanvasElement-->>CustomDashboard: update rendered content
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is largely incomplete, missing the Issue, Approach, and Tasks sections required by the template. Fill in the 'Closes' issue link, describe the approach and changes made, and check off applicable tasks (documentation and tests).
✅ Passed checks (2 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title accurately captures the main changes: improving usability through keyboard shortcuts and visual refinements, plus layout adjustments across canvas and element components.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/dashboard/Data/CustomDashboard/elements/DataTableElement.scss (1)

34-50: Make the refresh button visible on keyboard focus (a11y).

With opacity: 0 on Line 45 and only hover-driven reveal, keyboard users can land on an invisible control. Please reveal it on focus as well.

✅ Suggested fix
 .refreshButton {
   margin-left: auto;
   display: flex;
   align-items: center;
   justify-content: center;
   width: 24px;
   height: 24px;
   background: transparent;
   border: none;
   cursor: pointer;
   border-radius: 4px;
   opacity: 0;
   transition: background-color 0.15s ease, opacity 0.15s ease;

-  :global(.canvasElementWrapper):hover & {
+  :global(.canvasElementWrapper):hover &,
+  :global(.canvasElementWrapper):focus-within &,
+  &:focus-visible {
     opacity: 1;
   }
🤖 Fix all issues with AI agents
In `@src/dashboard/Data/CustomDashboard/CanvasElement.scss`:
- Around line 3-6: The rule .canvasElement currently sets user-select: none
which prevents selecting/copying any text inside the element; change the
stylesheet so that selection is only disabled for interactive handles and not
for content by removing or narrowing user-select: none on .canvasElement and
instead applying it to the handle selector(s) (e.g., .handle, .resize-handle) or
explicitly re-enabling selection inside the content region (e.g.,
.elementContent { user-select: text }) so text inside .elementContent remains
selectable while handles remain non-selectable.

@mtrezza mtrezza changed the title feat: Improve visibility and layout of canvas and elements feat: Improve usability and layout of canvas and elements Jan 24, 2026
@mtrezza mtrezza merged commit cd654dc into parse-community:alpha Jan 24, 2026
12 checks passed
parseplatformorg pushed a commit that referenced this pull request Jan 24, 2026
# [8.3.0-alpha.29](8.3.0-alpha.28...8.3.0-alpha.29) (2026-01-24)

### Features

* Improve usability and layout of canvas and elements ([#3148](#3148)) ([cd654dc](cd654dc))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 8.3.0-alpha.29

@parseplatformorg parseplatformorg added the state:released-alpha Released as alpha version label Jan 24, 2026
@mtrezza mtrezza deleted the fix/resize-select branch January 24, 2026 02:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state:released-alpha Released as alpha version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants