Skip to content

Fix editing comment with max length setting#14275

Merged
andreslucena merged 3 commits intodecidim:developfrom
i-need-another-coffee:fix/edit_comment_max_length
Mar 18, 2025
Merged

Fix editing comment with max length setting#14275
andreslucena merged 3 commits intodecidim:developfrom
i-need-another-coffee:fix/edit_comment_max_length

Conversation

@robertluca-publicis
Copy link
Copy Markdown
Contributor

🎩 What? Why?

When a component has Comments max length set, it is ignored when editing comments on that component because the form does not have the current_component context so it defaults to 1000 and the form is invalid.

📌 Related Issues

Testing

  1. Log in as admin and access the Admin Dashboard
  2. Go to a participatory process, and access the proposal component
  3. Modify the component to fix a limit of characters for comments superior to 1000 chars (= default value)
  4. Access a proposal details page and submit a comment over 1000 chars but below your limit
  5. Try to edit it and stay over the 1000 chars limit
  6. See that the update was successful

♥️ Thank you!

@github-actions github-actions bot added module: comments type: fix PRs that implement a fix for a bug labels Mar 11, 2025
github-actions[bot]
github-actions bot previously approved these changes Mar 11, 2025
@alecslupu alecslupu self-assigned this Mar 11, 2025
@alecslupu alecslupu added release: v0.28 Issues or PRs that need to be tackled for v0.28 release: v0.29 Issues or PRs that need to be tackled for v0.29 release: v0.30 Issues or PRs that need to be tackled for v0.30 labels Mar 12, 2025
alecslupu
alecslupu previously approved these changes Mar 12, 2025
Copy link
Copy Markdown
Contributor

@alecslupu alecslupu left a comment

Choose a reason for hiding this comment

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

👍

@alecslupu alecslupu assigned greenwoodt and unassigned alecslupu Mar 12, 2025
@alecslupu alecslupu requested a review from greenwoodt March 12, 2025 05:43
@alecslupu alecslupu moved this to 👀 In review in Maintainers' backlog Mar 12, 2025
@alecslupu
Copy link
Copy Markdown
Contributor

FYI: i just asked @robertluca-publicis to add a spec for this.

@greenwoodt
Copy link
Copy Markdown
Member

FYI: i just asked @robertluca-publicis to add a spec for this.

No worries. Advise when its ready to review!

Copy link
Copy Markdown
Contributor

@alecslupu alecslupu left a comment

Choose a reason for hiding this comment

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

👍

@alecslupu
Copy link
Copy Markdown
Contributor

No worries. Advise when its ready to review!

@greenwoodt this is ready

Copy link
Copy Markdown
Member

@greenwoodt greenwoodt left a comment

Choose a reason for hiding this comment

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

Works as intended 👍🏽

@alecslupu alecslupu assigned andreslucena and unassigned greenwoodt Mar 18, 2025
@alecslupu alecslupu requested a review from andreslucena March 18, 2025 09:39
@andreslucena andreslucena changed the title Fix edit comment max length error Fix editing comment with max length setting Mar 18, 2025
Copy link
Copy Markdown
Member

@andreslucena andreslucena left a comment

Choose a reason for hiding this comment

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

Great explanation of the problem and the solution. I think everything is great, thanks for the PR!

ok

@andreslucena andreslucena merged commit 8305fac into decidim:develop Mar 18, 2025
65 checks passed
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Maintainers' backlog Mar 18, 2025
@alecslupu alecslupu removed release: v0.28 Issues or PRs that need to be tackled for v0.28 release: v0.29 Issues or PRs that need to be tackled for v0.29 labels Mar 18, 2025
@alecslupu alecslupu added the release: v0.29 Issues or PRs that need to be tackled for v0.29 label Mar 18, 2025
@alecslupu alecslupu deleted the fix/edit_comment_max_length branch March 18, 2025 14:48
entantoencuanto added a commit that referenced this pull request Mar 20, 2025
* feature/signature_workflows:
  Add documentation for signature handler encryption secret and rename environment variable
  Rename method
  Fix title on spec for the 'Create new proposal' page (#14347)
  Fix WCAG search filters navigation (#14014)
  Fix comment cell to not show reply button when passing MAX_DEPTH (#14291)
  Fix editing comment with max length setting (#14275)
  Add title tag on pages for blogs, debates and meetings (#14110)
  Fix white bottom on proposal show with voting (#14285)
  New Crowdin updates (#14318)
  New Crowdin updates (#14217)
  Fix image missing error (#14175)
  Add delay of `spam_analysis` queue (#14304)
  Fix hide comment from interface (#14301)
  Change "Valuator" for "Evaluator" (#13684)
  Fix QR code generation (#14300)
  Patch backporter action (#14292)
  Change `hide_voting` argument on proposal cell to `show_voting` (#14267)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: comments release: v0.29 Issues or PRs that need to be tackled for v0.29 release: v0.30 Issues or PRs that need to be tackled for v0.30 type: fix PRs that implement a fix for a bug

Projects

No open projects
Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

Editing a comment is not possible when its length is higher than 1000

4 participants