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

fix: show error on Editor composer textarea #520

Merged
merged 14 commits into from
Jul 31, 2024

Conversation

wa0x6e
Copy link
Contributor

@wa0x6e wa0x6e commented Jul 23, 2024

Summary

Laying the groundworks for #517

The current proposal creation form does not validate the body, it just set a hard limit on the body textarea.

In addition, the composer editor textarea is not styled exactly like the rest of the textarea, preventing using the same css to style the errors.

This PR will:

  • add error support for the composer textarea, and validating the proposal body and user space statement
  • refactor the editor textarea, to make use of the existing textarea styling

Test

  • Go to the proposal creation page
  • Fill the textarea over the 9600 chars limit
  • It should show the error

Screenshot 2024-07-23 at 23 38 02

The PREVIEW markdown tab default height has also been adjusted to match the textarea height by default

Screenshot 2024-07-23 at 23 38 43

@wa0x6e wa0x6e marked this pull request as draft July 23, 2024 03:58
@wa0x6e wa0x6e changed the title fix: add limits to proposal's title, choices, and discussion fix: show error on proposal body error Jul 23, 2024
@wa0x6e wa0x6e requested review from Sekhmet and bonustrack July 23, 2024 14:54
@wa0x6e wa0x6e marked this pull request as ready for review July 23, 2024 14:54
Copy link
Member

@Sekhmet Sekhmet left a comment

Choose a reason for hiding this comment

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

If I have textarea with error and switch to markdown preview and back error state disappears.

@wa0x6e wa0x6e changed the title fix: show error on proposal body error fix: show error on Editor composer textarea Jul 25, 2024
@wa0x6e
Copy link
Contributor Author

wa0x6e commented Jul 25, 2024

If I have textarea with error and switch to markdown preview and back error state disappears.

Fixed.

Also added validation to the user space statement

@wa0x6e wa0x6e requested a review from Sekhmet July 25, 2024 09:06
@bonustrack
Copy link
Member

Can we show a different limit on space using Turbo? It should be 40k for Turbo, also for normal spaces I believe the limit should be 10k

@wa0x6e
Copy link
Contributor Author

wa0x6e commented Jul 31, 2024

Can we show a different limit on space using Turbo? It should be 40k for Turbo, also for normal spaces I believe the limit should be 10k

Yes, but this will come from a different PR #524

Copy link
Member

@bonustrack bonustrack left a comment

Choose a reason for hiding this comment

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

tACK

Copy link
Member

@Sekhmet Sekhmet left a comment

Choose a reason for hiding this comment

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

tACK

@Sekhmet Sekhmet merged commit aebd886 into master Jul 31, 2024
3 checks passed
@Sekhmet Sekhmet deleted the fix-limit-proposal-fields-length branch July 31, 2024 10:03
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