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

chore: refactor polls #2867

Merged
merged 3 commits into from
May 16, 2023
Merged

chore: refactor polls #2867

merged 3 commits into from
May 16, 2023

Conversation

bigint
Copy link
Member

@bigint bigint commented May 16, 2023

  • feat: add pluralize function
  • chore: use lingui plurals instead
  • feat: add poll disable check

What does this PR do?

πŸ€– Generated by Copilot at 572b84c

Added a poll editor and validation logic to the new publication component in the web app. Added pluralization support for poll duration in days using plural from @lingui/macro. Added new messages for some features and validations to the translation files, but left some of them untranslated. Changed the default poll duration from 7 to 1 day in apps/web/src/store/publication.ts.

Related issues

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Enhancement (non-breaking small changes to existing functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Explanation of the changes

πŸ€– Generated by Copilot at 572b84c

  • Added pluralization logic for poll duration in days using plural function from @lingui/macro (link, link, link, link, link, link, link)
  • Added validation logic for poll choices and disabled publication submission button if poll is invalid (link, link, link)
  • Added new messages for remote attachment preview and profile name validation to translation files (link, link, link, link, link, link, link, link, link, link)
  • Removed empty lines at the end of translation files (link, link, link, link)
  • Changed default poll duration in days from 7 to 1 in resetPollConfig function of usePublicationStore hook in apps/web/src/store/publication.ts (link)

Emoji

πŸ”„πŸ—³οΈπŸŒ

@vercel
Copy link

vercel bot commented May 16, 2023

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Updated (UTC)
prerender βœ… Ready (Inspect) Visit Preview May 16, 2023 6:54am
ui βœ… Ready (Inspect) Visit Preview May 16, 2023 6:54am
web βœ… Ready (Inspect) Visit Preview May 16, 2023 6:54am

@vercel vercel bot temporarily deployed to Preview – prerender May 16, 2023 06:51 Inactive
@bigint bigint enabled auto-merge May 16, 2023 06:52
@bigint bigint disabled auto-merge May 16, 2023 06:52
@vercel vercel bot temporarily deployed to Preview – ui May 16, 2023 06:52 Inactive
@bigint bigint merged commit 1f9ad23 into main May 16, 2023
5 checks passed
@bigint bigint deleted the final-poll-refactor branch May 16, 2023 06:52
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.

None yet

1 participant