Skip to content

Conversation

@atyrode
Copy link
Contributor

@atyrode atyrode commented Apr 28, 2025

This adds a new Settings menu in the main menu of pad.ws:
Screenshot 2025-04-28 at 03 43 53

Currently, it allows to change the "lock time" of embeds when scrolling the view to move around:
Screenshot 2025-04-28 at 03 45 28

atyrode added 10 commits April 28, 2025 00:15
…nMenu

- Introduced a new SettingsDialog component for managing application settings.
- Updated ExcalidrawWrapper to handle the visibility of the SettingsDialog.
- Enhanced MainMenu to include a Settings option that triggers the SettingsDialog.
- Added corresponding styles for the SettingsDialog to ensure a cohesive UI experience.
- Added UserSettings interface and default settings for embed lock debounce time.
- Integrated settings management into SettingsDialog, allowing users to adjust embed lock debounce time via a range input.
- Updated normalizeCanvasData to preserve user settings when normalizing canvas data.
- Improved styles for SettingsDialog to enhance user experience and organization.
- Introduced a memoized debounced function to manage scrolling state more efficiently.
- Updated lockEmbeddables to accept appState for customizable debounce timing.
- Modified ExcalidrawWrapper to integrate the new scrolling behavior, ensuring smoother user experience during scrolling events.
- Introduced background color and backdrop filter to the dialog wrapper for better visual appeal.
- Introduced a new Range component for user input, allowing adjustable values with labels and a value bubble.
- Integrated the Range component into SettingsDialog for managing embed lock debounce time, enhancing user experience with visual feedback.
- Added corresponding styles in Range.scss for improved UI consistency.
- Updated Range.scss and Range.tsx to implement BEM naming conventions for improved readability and maintainability.
- Introduced new CSS variables for track colors to enhance customization.
- Adjusted styles for input and labels to align with the new structure, ensuring consistent UI presentation.
- Replaced the specific embedLockDebounceTime handler with a more generic updateSetting function to streamline state updates for various settings.
- Removed unused styles from SettingsDialog.scss to enhance code clarity and maintainability.
- Updated the calculation for embedLockDebounceTime in SettingsDialog to round the mapped value to the nearest multiple of 50, enhancing precision in user settings adjustments.
- Updated the label in SettingsDialog to "Embed Lock Time" for improved clarity and user understanding of the setting.
@atyrode atyrode merged commit 8055112 into main Apr 28, 2025
1 check passed
@atyrode atyrode deleted the settings-menu branch April 28, 2025 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants