-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add Content Block Tax Rate content type #2806
Conversation
This schema was added to Publishing API here alphagov/publishing-api#2806
This schema was added to Publishing API here alphagov/publishing-api#2806
64f5743
to
45212d1
Compare
This schema was added to Publishing API here alphagov/publishing-api#2806
The Content Modelling Team are working on a spike to add the ability to publishing reusable pieces of content (“Content Blocks”) via Whitehall. This adds a simple initial schema to help us work with a type of tax rate.
45212d1
to
fe33751
Compare
band: { | ||
type: "string", | ||
}, | ||
income: { | ||
type: "string", | ||
}, | ||
rate: { | ||
type: "string", | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an interesting one, because I think we're mixing up metadata and actual data here. To me, the band
and the income
would be metadata here, as they wouldn't actually be returned to the user. My mental model was more like we'd have two content types, tax_income
and tax_rate
, with individual body fields.
To use the example of a table of tax rates, I'd expect it to be used like this:
Band | Taxable income | Tax rate |
---|---|---|
Personal Allowance | {{embed:tax_income:personal-allowance}} | {{embed:tax_rate:personal-allowance}} |
Basic rate | {{embed:tax_income:basic-rate}} | {{embed:tax_rate:basic-rate}} |
Higher rate | {{embed:tax_income:higher-rate}} | {{embed:tax_rate:higher-rate}} |
Additional rate | {{embed:tax_income:additional-rate}} | {{embed:tax_rate:additional-rate}} |
That said (and this is a thing that's just occurred to me), if we went with this approach we could potentially have a more three-dimensional view and do something like this:
Band | Taxable income | Tax rate |
---|---|---|
Personal Allowance | {{embed:tax_rate:personal-allowance:income}} | {{embed:tax_rate:personal-allowance:rate}} |
Basic rate | {{embed:tax_rate:basic-rate:income}} | {{{embed:tax_rate:basic-rate:rate}} |
Higher rate | {{embed:tax_rate:higher-rate:income}} | {{embed:tax_rate:higher-rate:rate}} |
Additional rate | {{embed:tax_rate:additional-rate:income}} | {{embed:tax_rate:additional-rate:rate}} |
Which could be quite cool. I think we'd need to run this via Rik first, as well as think how this would work within the rest of the user journey. Potentially super powerful though, and would also scale to things like contacts etc too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, I just thought that that entire row on this page for example could be a bit of re-usable content in other Editions https://www.gov.uk/income-tax-rates
Is there another block type that's less controversial we could use that would give us a schema with multiple fields? I think it would be really useful to have a 'straw man' to help us see how the different types work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about telephone number?
Closing for #2807 |
The Content Modelling Team are working on a spike to add the ability to publishing reusable pieces of content (“Content Blocks”) via Whitehall. This adds a simple initial schema to help us work with a type of tax rate.
Added to Whitehall here: alphagov/whitehall#9278
Some things I found out:
rate
field an integer and a percentage - so max 100 value. However, our current form submites everything as strings, e.g. 100 becomes "100" so we would need to do more work to make this possible.