Skip to content
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

refactor: overwritable settings config #4854

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Schwehn42
Copy link
Member

Description

The last couple of refactors concerning the settings dialog (#4265) were a great upgrade allowing for configuration of settings items, including name, color etc. as well as when these are enabled (settings were only used on boards before, now they're also available for every other route).

While this is quite convenient, the menu items themselves are still constant, with the only possibility to toggle which ones are displayed, but not for the properties themselves.

Hence, with this PR it's now also possible to override settings at runtime by passing an override prop to the SettingsDialog component.

Example

<Route path="settings" element={<SettingsDialog 
  enabledMenuItems={{...ENABLE_ALL, feedback: feedbackEnabled}}
  overwrite={{appearance: {color: "goal-green"}}} />}
>
  <Route path="appearance" element={<Appearance />} />
  {/* other settings routes here */}
</Route>

Changelog

  • add new prop ?overwrite of new type MenuItemConfigOverride to SettingsDialog
  • add typesafe function to merge with MENU_ITEM_CONFIG
  • internal changes to SettingsDialog where the merged config is used as state in order to render the settings

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • The application was tested in the most commonly used browsers (e.g. Chrome, Firefox, Safari)

@Schwehn42 Schwehn42 added the Review Needed This pull request is ready for review label Feb 17, 2025
@Schwehn42 Schwehn42 self-assigned this Feb 17, 2025
Copy link

The deployment to the dev cluster was successful. You can find the deployment here: https://4854.development.scrumlr.fra.ics.inovex.io
This deployment is only for testing purposes and will be deleted after 1 week.
To redeploy rerun the workflow.
DO NOT STORE IMPORTANT DATA ON THIS DEPLOYMENT

Deployed Images
  • ghcr.io/inovex/scrumlr.io/scrumlr-frontend:sha-dabea46

  • ghcr.io/inovex/scrumlr.io/scrumlr-server:sha-dabea46

Copy link

octomind-dev bot commented Feb 17, 2025

🐙 Octomind

Test Report: 14/14 successful.

description status details
About Section Visibility Test Passed ✅ click
change avatar Passed ✅ click
check Privacy Policy Passed ✅ click
check terms & conditions Passed ✅ click
close cookie banner - front page Passed ✅ click
close cookie banner - sign-in Passed ✅ click
create and delete board columns Passed ✅ click
create_and_delete_notes_and_actions_v2 Passed ✅ click
create lean coffee board Passed ✅ click
edit_notes_and_actions_v5 Passed ✅ click
get started Passed ✅ click
share_session Passed ✅ click
sign-in Passed ✅ click
test all ways to open the setup flow Passed ✅ click

commit sha: dabea46

@Schwehn42 Schwehn42 mentioned this pull request Feb 17, 2025
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Review Needed This pull request is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant