Skip to content
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

Investigate making macros work better with the prototype kit #548

Open
joelanman opened this issue Jul 12, 2018 · 5 comments
Open

Investigate making macros work better with the prototype kit #548

joelanman opened this issue Jul 12, 2018 · 5 comments
Labels
Feature Request User requests a new feature 🕔 Weeks This is complicated and will require a lot of effort from the team.

Comments

@joelanman
Copy link
Contributor

joelanman commented Jul 12, 2018

From support, a checkbox item could look like this:

{ html: "Pension annex not uploaded",
value: "Pension annex not uploaded",
checked: (checked('reject','Pension annex not uploaded') == 'checked') },

In the kit we could make this much simpler.

  1. If a value is not given, we could make it the same as the text.
  2. We can manage checked automatically, by looking at the name and value and checking it against the stored data.

Leading to:

{ text: "Pension annex not uploaded"},

This would be relevant to other macros too.

I wonder if we can have macros in the prototype kit that try to do this extra work first, then call the Frontend macros. That way we keep in sync with Frontend macros.

@NickColley
Copy link
Contributor

NickColley commented Jul 12, 2018

I did a small experiment how downstream macros can wrap upstream components, which might help this: https://glitch.com/edit/#!/downstream-nunjucks-macro-example

Since we have control over the kit we could add options merging custom functions to make it more robust.

@joelanman
Copy link
Contributor Author

I think a question here is if we did this (and it seems very useful to do so) how would we document it in the design system? The nunjucks tab would be different for prototyping and production.

@NickColley
Copy link
Contributor

Yeah, we need to weigh up the overhead of a forked journey I guess

@NickColley NickColley added the Feature Request User requests a new feature label Aug 20, 2018
@timpaul timpaul added 🕔 Weeks This is complicated and will require a lot of effort from the team. Priority: low labels May 20, 2019
@hannalaakso
Copy link
Member

hannalaakso commented Nov 4, 2019

This is relevant: #624

@ruthhammond
Copy link

@joelanman to look for related ticket raised by Ollie

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request User requests a new feature 🕔 Weeks This is complicated and will require a lot of effort from the team.
Projects
None yet
Development

No branches or pull requests

5 participants