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

🐛🔨 Section: Shorten Factory Generated Room#description #2081

Merged

Conversation

zspencer
Copy link
Member

@zspencer zspencer commented Jan 4, 2024

Apparently, some of the Expanse Quotes are quite long; making them ill-suited for a 300 character limited
field
.

This shortens those down so they don't explode.

- #1155
- #1988

Apparently, some of the Expanse Quotes are quite long; making them
[ill-suited for a 300 character limited
field](https://github.com/zinc-collective/convene/actions/runs/7403679313/job/20145303706?pr=2079).

This shortens those down so they don't explode.
@zspencer zspencer added 🐞 bug Something isn't working 🔨 Squashed Bugs we think we fixed labels Jan 4, 2024
@zspencer zspencer requested review from a team January 4, 2024 02:10
@@ -16,7 +16,7 @@
end

trait :with_description do
description { Faker::TvShows::TheExpanse.quote }
description { Faker::TvShows::TheExpanse.quote.truncate(300) }
Copy link
Contributor

Choose a reason for hiding this comment

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

Could this value be stored in a constant, like Room::DescriptionLength? It feels magical here.

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 could go with Room::MAXIMUM_DESCRIPTION_LENGTH.

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 went with DESCRIPTION_MAX_LENGTH so the starting letter for the constant matches the attribute it is used to validate.

@zspencer zspencer merged commit 7fb1a11 into main Jan 4, 2024
4 checks passed
@zspencer zspencer deleted the section_navigation/prevent-flakiness-for-long-descriptions branch January 4, 2024 02:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working 🔨 Squashed Bugs we think we fixed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants