Skip to content

Conversation

@estyxx
Copy link
Member

@estyxx estyxx commented Dec 1, 2024

What

ToDo

- Updated `grant_type` field in models to be a JSONField to support multiple choices.
- Modified input types and serializers to handle list of `GrantType`.
- Adjusted frontend components to use checkboxes for multiple selections.
- Updated migration to convert existing single choice `grant_type` to list.
- Updated tests and factories to reflect the changes.
@vercel
Copy link

vercel bot commented Dec 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
pycon ❌ Failed (Inspect) Dec 1, 2024 8:41pm

<VerticalStack gap="small">
{grantType.map((type, index) => (
<Text size="label2" weight="strong">
{" "}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why the empty space? maybe a vertical Spacer works better?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no was a mistake, think my editor put it somehow

@codecov
Copy link

codecov bot commented Dec 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.12%. Comparing base (8ede0e7) to head (2e7e106).
Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4200   +/-   ##
=======================================
  Coverage   94.12%   94.12%           
=======================================
  Files         331      331           
  Lines        9176     9176           
  Branches      627      627           
=======================================
  Hits         8637     8637           
  Misses        453      453           
  Partials       86       86           

"grants.form.fields.grantType":
"Select all grant categories that apply to you",
"grants.form.fields.grantType.description": `You can choose more than one option if applicable.
Note: If you have submitted a talk/workshop proposal, you do not need to apply for a grant to receive a refund. If your proposal is accepted, we will contact you regarding the ticket refund.`,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to be more specific, we need to make sure it is clear we are only talking about the ticket. Otherwise people might think we are going to refund all their expenses

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I adjusted the text slightly

<div>{{grant.get_grant_type_display}}</div>
<div>
{% for type_ in grant.grant_type %}
{{type_}}
Copy link
Member

@marcoacierno marcoacierno Dec 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will probably be displayed quite bad?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not too bad...
CleanShot 2024-12-01 at 22 35 17@2x
CleanShot 2024-12-01 at 22 35 09@2x

@marcoacierno marcoacierno merged commit b901915 into main Dec 1, 2024
7 of 8 checks passed
@marcoacierno marcoacierno deleted the grants/grant-type-multi-choices branch December 1, 2024 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants