1
0
Fork 1

Convert modals to dynamic #32

Open
opened 1 year ago by gravel · 1 comments
gravel commented 1 year ago
Collaborator

Current behaviour:

Modals for all 100+ Communities are shipped with the DOM. As modals are JS-only, this behaviour can and should be replaced.

Suggested behaviour:

A modal skeleton is shipped. With JS enabled, this modal is hydrated each time the QR code icon is clicked.

Benefits:

The main benefit is reducing and good practices.

Futhermore, additional information can be included in the modal, such as creation date, staff coverage, etc; see #6. This allows users to better decide what Communities to join.

Tasks:

  • Choose method to serve QR codes, see #11
  • Move QR code functions from qr_modals.php to utility file
  • Replace HTML generated for QR code modals with draft of modal skeleton
  • Use QR code utility functions based on chosen method:
    • Download QR codes into /output/qr during data fetch, or
    • Add base64 QR codes as new tab links in Community table
  • Figure out what modal should show
    1. Then include intended information in table row data attributes
    2. Prapre standard functions to fetch these data attributes from a table row
    3. Same for parsing the base64 QR code, if applicable
    4. Flesh out modal skeleton with these fields
  • Change displayQRModal to hydrate modal skeleton
  • Touch-up modal design
**Current behaviour**: Modals for all 100+ Communities are shipped with the DOM. As modals are JS-only, this behaviour can and should be replaced. **Suggested behaviour**: A modal skeleton is shipped. With JS enabled, this modal is hydrated each time the QR code icon is clicked. **Benefits**: The main benefit is reducing and good practices. Futhermore, additional information can be included in the modal, such as creation date, staff coverage, etc; see #6. This allows users to better decide what Communities to join. **Tasks**: - Choose method to serve QR codes, see #11 - Move QR code functions from [qr_modals.php](sites/+components/qr_modals.php) to utility file - Replace HTML generated for QR code modals with draft of modal skeleton - Use QR code utility functions based on chosen method: - Download QR codes into `/output/qr` during data fetch, or - Add base64 QR codes as new tab links in Community table - Figure out what modal should show 1. Then include intended information in table row data attributes 1. Prapre standard functions to fetch these data attributes from a table row 1. Same for parsing the base64 QR code, if applicable 1. Flesh out modal skeleton with these fields - Change `displayQRModal` to hydrate modal skeleton - Touch-up modal design
gravel changed title from Dynamic modals to Convert modals to dynamic 1 year ago
SomeGuy commented 1 year ago
Owner

I'd also like to make case to switch to <dialog> for accessiblity reasons.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog

I'd also like to make case to switch to `<dialog>` for accessiblity reasons. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog
This repo is archived. You cannot comment on issues.
No Label
No Milestone
No Assignees
2 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: SomeGuy/sessioncommunities.online#32
Loading…
There is no content yet.