-
Notifications
You must be signed in to change notification settings - Fork 166
WIP #1493
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
Draft
Sak1012
wants to merge
1
commit into
fossasia:enext
Choose a base branch
from
Sak1012:enext
base: enext
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
WIP #1493
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
Reviewer's GuideRefactors color picker handling to add a visible color preview and more robust contrast messaging, introduces a styled locale switch dropdown in the presale header, tweaks styles to keep dropdown items legible, and defers CSS regeneration tasks until after DB transactions commit for events and organizers. Sequence diagram for enhanced color picker preview and contrast updatesequenceDiagram
actor User
participant Browser
participant ColorInput as Colorpickerfield_input
participant PreviewHelper as updateColorPreview
participant ContrastHelper as updateContrastState
User->>Browser: Type/select color
Browser->>ColorInput: input/changeColor/create event
rect rgb(245,245,245)
note over ColorInput: Ensure preview wrapper exists
ColorInput->>PreviewHelper: updateColorPreview(input, colorString)
PreviewHelper->>PreviewHelper: ensureColorPreview(input)
PreviewHelper->>ColorInput: Update preview element and host
end
alt changeColor or create from plugin
ColorInput->>ContrastHelper: updateContrastState(input, rgb)
ContrastHelper->>ContrastHelper: getColorFieldHost(input)
ContrastHelper->>ContrastHelper: Compute contrast(rgb, white)
ContrastHelper->>ColorInput: Update .contrast-state message and classes
else plain input event
ColorInput->>PreviewHelper: updateColorPreview(input)
PreviewHelper-->>ColorInput: Preview updated only
end
Sequence diagram for deferred CSS regeneration after settings savesequenceDiagram
actor User
participant View as DjangoView_form_valid
participant DB as DatabaseTransaction
participant Hook as transaction_on_commit
participant Task as CeleryTask_regenerate_css
User->>View: Submit settings form
View->>DB: Save settings
alt CSS-affecting settings changed
View->>Hook: on_commit(callback to regenerate_css.apply)
Hook-->>View: Callback registered
else No CSS changes
View-->>User: Redirect with success (no task)
end
DB-->>Hook: Transaction committed
Hook->>Task: regenerate_css.apply(event_pk)
Task-->>View: Task enqueued for worker
View-->>User: Redirect with success
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #1365, #1364
Summary by Sourcery
Improve color picker UX and locale switching UI while ensuring CSS regeneration tasks run only after successful transactions commit.
New Features:
Bug Fixes:
Enhancements: