Problem/Motivation
We want to be able to check that all the SDC components render properly within a page.
Steps to reproduce
Proposed resolution
Create a dummy page that has all the components in it.
Remaining tasks
- Figure location and URL
- Add code
- Update docs to point at this for debugging
User interface changes
There will be a reference page with all components you can look at.
API changes
Data model changes
| Comment | File | Size | Author |
|---|
Issue fork demo_design_system-3465585
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3465585-create-dummy-page
changes, plain diff MR !18
Comments
Comment #2
kristen polAssigning this one to Jacob, but I'll help figure out where this goes.
Comment #3
kristen polI played around with this a couple days ago and ran into road block so parking for the moment.
Comment #4
kristen polAssigning to Alan.
Comment #5
kristen polAssigning to Joshua since Alan is out most of this week.
Comment #6
kristen polHere's an example of how someone tested rendering of a component:
https://www.drupal.org/project/demo_design_system/issues/3465043#comment...
Comment #7
kristen polBumping priority.
Comment #8
joshua1234511I did play around with the code and could think of two approaches and a blocker
Creating a Demo Page: programmatically create a page that shows all components by adding paragraphs for each component. However, this approach requires creating an actual page with these paragraphs, which would need default content.
Alternative Using Views: Another approach could be to create a view that lists all paragraphs. If each field in the paragraph has a default value, you can list them directly in the view. This could serve as a dynamic display of components, though it still relies on having those paragraphs with default content in place.
In both cases the blocker: overriding the paragraph templates to embed/include the SDC components.
Needs to be done manually as done here https://www.drupal.org/project/demo_design_system/issues/3465043#comment...
-- Once all components are updated paragraph templates to embed/include the SDC components. ie : reference https://git.drupalcode.org/project/demo_design_system/-/merge_requests/3...
Comment #9
kristen polThanks. Perhaps discuss this with Richard and Alan to get their thoughts on this
Comment #10
richardgaunt commentedhttps://github.com/civictheme/civictheme_content
This is how CivicTheme generates content - can you utilise these methods to generate components to your needs.
Comment #11
kristen polBummer… I was hoping we didn’t need a separate module…
Comment #12
joshua1234511If we are going with the module then it's just adding the steps in the document.
The module is updated with latest CivicTheme components which will create random content for various components.
If we manually try to add the data, will need to create function to create each component, is basically what the module will do.
Comment #13
kristen polWe also need content for the custom components do we wouldn’t use that module. We’d have to make a companion one for SDDS.
Comment #14
joshua1234511Proof of Concept (PoC) for content provisioning with Content & Callout Component.
Comment #16
kristen polThanks. Assigning to Jacob to test.
Comment #17
kristen polLet's hold off on this one for now because we also want to try to get rid of unnecessary dependencies for the demo so this might be at odds with that:
#3465047: Remove unnecessary dependencies before DrupalCon Barcelona
Comment #18
kristen polLowering priority. We are starting to be able to see components in XB so we might not need this.
Comment #19
kristen polRemoving parent. This work might be considered post-Barcelona.
Note, later, there may be a way to pre-build all of these in XB for viewing/testing.
Comment #21
kristen polClosing this in lieu of:
#3472910: Create a front page template page that shows all the SDDS components
I'll add credit there.