Skip to content

Handle hidden and print fields without needing direct access to the hide/print flag fields #558

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

Merged

Conversation

carrythebanner
Copy link
Collaborator

@carrythebanner carrythebanner commented Jan 17, 2024

See comment on #555 regarding the "hide" boolean fields. The "print" boolean fields are similar, though they operate independently (e.g. you can hide your email online, but opt to include it in print).


We currently use the "hide" booleans in the event list view, but only to manage the preview mode when editing (see #380). Otherwise, they're redundant because the backend properly provides or nulls private fields if they're supposed to be hidden.

This change alters the handling of those fields so that the preview function pulls the "hide" boolean values directly from the current state of the edit form. It also checks the "print" boolean fields, and if they're enabled, sets a special "print preview" field with the appropriate value.

After this change, the events endpoint should no longer need either the "hide" or "print" boolean fields, and we could consider removing them from that API response. (They would still be needed for the manage_event and retrieve_event endpoints.)

@carrythebanner
Copy link
Collaborator Author

This change is a bit weedy, and should definitely have a bit of testing to make sure we've covered our bases. We don't want to accidentally share anything that's supposed to be hidden.

@carrythebanner carrythebanner merged commit 2aadea6 into shift-org:main Jan 23, 2024
@carrythebanner carrythebanner deleted the hidden-and-private-fields branch April 29, 2025 01:31
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.

1 participant