Menu toggle button sub-template

Created on 18 March 2025, 3 months ago

Problem/Motivation

In ✨ Break-up menu template into sub-templates Active we created a new template for the SVG icon of the toggle button. Unsure if we still want to create a sub-template / override for the button portion, but opening here to preserve that original intent. (We may decide to close later if this is not actually a useful thing to do for people).

Proposed resolution

Create a Twig template for the button/toggle

Remaining tasks

1. determine if we actually care to do this :)

2. make the button its own template

πŸ“Œ Task
Status

Active

Version

2.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States chrisfromredfin Portland, Maine

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @chrisfromredfin
  • πŸ‡ΊπŸ‡ΈUnited States sonfd Portland, ME

    I have been thinking about this and I think we want:

    1. to break the main template into smaller templates
    2. folks to be able to override the smaller templates without necessarily needing to override the main template

    I think the second goal is maybe more of a nice-to-have than a requirement. If the main template just includes a bunch of smaller templates, it should be easier to override it without it being a problem.

    I know the point of Single Directory Components is that all of the css, js, etc are all in one directory, but I wonder if using them for the smaller pieces of the main disclosure menu template is the best option, even though I think we'd still keep the css and js all in one place, attached to the main template. Each sub-template could be an SDC, basically a more defined include, and would really just define a template. SDCs would allow us to easily define the smaller templates in a way that would allow any theme to override any one of those templates easily without modifying the main template. 🀷

Production build 0.71.5 2024