-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
feat: Add dashboard configuration store on Parse Server #2860
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
base: alpha
Are you sure you want to change the base?
feat: Add dashboard configuration store on Parse Server #2860
Conversation
🚀 Thanks for opening this pull request! We appreciate your effort in improving the project. Please let us know once your pull request is ready for review. |
Warning Rate limit exceeded@dblythy has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 2 minutes and 3 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe changes introduce server-side storage and retrieval of dashboard configuration preferences, including columns and class settings. This is achieved by adding new functions for loading and saving preferences from/to a Parse class, updating React components to support these operations, and documenting the feature and its configuration in the README. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant DashboardSettings
participant ParseServer
User->>DashboardSettings: Clicks "Save Columns" or "Save Classes"
DashboardSettings->>ParseServer: Query for existing preferences object
alt Preferences object exists
DashboardSettings->>ParseServer: Update preferences object with new data
else Preferences object does not exist
DashboardSettings->>ParseServer: Create new preferences object with ACL
end
ParseServer-->>DashboardSettings: Confirmation of save
DashboardSettings-->>User: Show success or error notification
sequenceDiagram
participant BrowserComponent
participant ParseServer
BrowserComponent->>ParseServer: Query for stored column/class preferences (on mount)
ParseServer-->>BrowserComponent: Return preferences data (if any)
BrowserComponent->>BrowserComponent: Merge and apply preferences locally
Assessment against linked issues
Assessment against linked issues: Out-of-scope changesNo out-of-scope changes found. 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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
🎉 Snyk checks have passed. No issues have been found so far.✅ security/snyk check is complete. No issues have been found. (View Details) |
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.
Actionable comments posted: 4
🧹 Nitpick comments (2)
src/lib/ColumnPreferences.js (1)
13-13
: Consider using aliased imports for consistency.With the new path aliases configured in
jsconfig.json
, you could useimport Parse from 'lib/Parse'
or similar for consistency with the new module resolution setup.README.md (1)
404-404
: Fix typo in the documentation.There's a typo: "confiugration" should be "configuration".
-You can save the confiugration on the server by specifying `preferencesClassName` +You can save the configuration on the server by specifying `preferencesClassName`
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
README.md
(1 hunks)jsconfig.json
(1 hunks)src/dashboard/Data/Browser/Browser.react.js
(1 hunks)src/dashboard/Settings/DashboardSettings/DashboardSettings.react.js
(5 hunks)src/lib/ClassPreferences.js
(1 hunks)src/lib/ColumnPreferences.js
(1 hunks)src/lib/ParseApp.js
(4 hunks)
🧰 Additional context used
🧠 Learnings (1)
src/lib/ClassPreferences.js (1)
Learnt from: mtrezza
PR: parse-community/parse-dashboard#2769
File: src/lib/ClassPreferences.js:26-26
Timestamp: 2025-05-02T11:55:52.809Z
Learning: Preference reads and writes in the ClassPreferences.js module are expected to be infrequent operations, so optimizing for performance (like caching) is unnecessary in this context.
🪛 GitHub Check: Lint
src/lib/ClassPreferences.js
[failure] 29-29:
Expected indentation of 6 spaces but found 12
[failure] 28-28:
Expected indentation of 6 spaces but found 12
[failure] 27-27:
Expected indentation of 8 spaces but found 14
[failure] 26-26:
Expected indentation of 6 spaces but found 12
[failure] 25-25:
Expected indentation of 4 spaces but found 10
[failure] 24-24:
Expected indentation of 4 spaces but found 10
[failure] 23-23:
Expected indentation of 4 spaces but found 10
[failure] 8-8:
Expected indentation of 4 spaces but found 8
[failure] 7-7:
Expected indentation of 4 spaces but found 8
[failure] 6-6:
Expected indentation of 4 spaces but found 8
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Docker linux/amd64
🔇 Additional comments (12)
jsconfig.json (1)
3-9
: LGTM! Clean module resolution configuration.The addition of
baseUrl
and path aliases will enable cleaner imports throughout the project, making the codebase more maintainable.src/lib/ColumnPreferences.js (1)
16-19
: Review security implications of using master key on client.Using
useMasterKey: true
in client-side code could potentially expose sensitive operations. Ensure this is intentional and that the preferences class has appropriate ACLs configured.#!/bin/bash # Search for other uses of useMasterKey in the codebase to understand the pattern rg "useMasterKey.*true" -A 2 -B 2src/lib/ParseApp.js (3)
11-11
: LGTM!Clean refactoring of the import to use the new centralized
setClassPreferences
function.
53-53
: LGTM!Proper addition of the
preferencesClassName
parameter to support server-side preference storage.
83-83
: LGTM!Good refactoring that replaces manual preference merging logic with a centralized call to
setClassPreferences
. This improves maintainability and consistency across the codebase.Also applies to: 114-114
src/lib/ClassPreferences.js (2)
2-2
: LGTM!Appropriate import of Parse for server-side functionality.
4-15
: LGTM!The
load
function correctly queries the Parse server for user preferences and applies them using the centralized preference setting logic.src/dashboard/Settings/DashboardSettings/DashboardSettings.react.js (5)
23-24
: LGTM!Proper setup of Parse import and CurrentApp context for accessing app configuration.
Also applies to: 27-27
55-55
: LGTM!Good initialization of
showSavePreferences
state based on the presence ofpreferencesClassName
in the app context.
70-97
: LGTM!The
saveColumns
method correctly implements server-side persistence with proper ACL setup, error handling, and user feedback.
110-133
: LGTM!The
saveClasses
method follows the same solid pattern assaveColumns
with appropriate error handling and notifications.
428-431
: LGTM!Proper conditional rendering of the Save Column Preferences button when server-side saving is enabled.
src/dashboard/Settings/DashboardSettings/DashboardSettings.react.js
Outdated
Show resolved
Hide resolved
Uffizzi Ephemeral Environment
|
New Pull Request Checklist
Issue Description
Closes: #2555
Approach
TODOs before merging
Summary by CodeRabbit
New Features
Documentation
Chores