Compare commits

...

11 Commits

Author SHA1 Message Date
Zee Aslam
e574a91d93
Merge 036eefcc94 into 74fc4dbacf 2025-07-15 17:05:58 +00:00
diondiondion
74fc4dbacf
refactor: Only remove pointer-events when necessary (#35390)
Some checks failed
Check i18n / check-i18n (push) Waiting to run
Chromatic / Run Chromatic (push) Waiting to run
CodeQL / Analyze (javascript) (push) Waiting to run
CodeQL / Analyze (ruby) (push) Waiting to run
Check formatting / lint (push) Waiting to run
CSS Linting / lint (push) Waiting to run
Ruby Testing / build (production) (push) Waiting to run
Ruby Testing / build (test) (push) Waiting to run
Ruby Testing / test (.ruby-version) (push) Blocked by required conditions
Ruby Testing / test (3.2) (push) Blocked by required conditions
Ruby Testing / test (3.3) (push) Blocked by required conditions
Ruby Testing / ImageMagick tests (.ruby-version) (push) Blocked by required conditions
Ruby Testing / ImageMagick tests (3.2) (push) Blocked by required conditions
Ruby Testing / ImageMagick tests (3.3) (push) Blocked by required conditions
Ruby Testing / End to End testing (.ruby-version) (push) Blocked by required conditions
Ruby Testing / End to End testing (3.2) (push) Blocked by required conditions
Ruby Testing / End to End testing (3.3) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, docker.elastic.co/elasticsearch/elasticsearch:8.10.2) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, opensearchproject/opensearch:2) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (3.2, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (3.3, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Blocked by required conditions
Crowdin / Upload translations / upload-translations (push) Has been cancelled
Haml Linting / lint (push) Has been cancelled
Ruby Linting / lint (push) Has been cancelled
Historical data migration test / test (14-alpine) (push) Has been cancelled
Historical data migration test / test (15-alpine) (push) Has been cancelled
Historical data migration test / test (16-alpine) (push) Has been cancelled
Historical data migration test / test (17-alpine) (push) Has been cancelled
2025-07-15 15:57:31 +00:00
Zee Aslam
036eefcc94
Merge branch 'main' into fix-10609-poll-options 2025-07-02 22:57:00 -04:00
Zee Aslam
06af2d2bc3
Merge branch 'main' into fix-10609-poll-options 2025-07-01 12:39:21 -04:00
Zee Aslam
491686db20
Merge branch 'main' into fix-10609-poll-options 2025-06-30 17:14:04 -04:00
Zee Aslam
f5e6722627
Merge branch 'main' into fix-10609-poll-options 2025-06-29 19:58:51 -04:00
Zee Aslam
0e66f139c8
Merge branch 'main' into fix-10609-poll-options 2025-06-26 12:17:40 -04:00
Zee Aslam
aa6a77fa1b
Update poll_options_validator.rb
Fix defaults to upstream mastodon values instead of glitch-soc
2025-06-25 19:08:28 -04:00
Zee Aslam
553642b43f
Merge branch 'main' into fix-10609-poll-options 2025-06-25 15:35:42 -04:00
Zee Aslam
9b9e3dd453
Update .env.production.sample 2025-06-25 14:25:12 -04:00
Zee Aslam
1761ae6ab0
Update poll_options_validator.rb 2025-06-25 14:22:46 -04:00
3 changed files with 8 additions and 4 deletions

View File

@ -109,3 +109,9 @@ FETCH_REPLIES_MAX_SINGLE=500
# Max number of replies Collection pages to fetch - total
FETCH_REPLIES_MAX_PAGES=500
# Maximum allowed poll options
MAX_POLL_OPTIONS=4
# Maximum allowed poll option characters
MAX_POLL_OPTION_CHARS=50

View File

@ -2848,7 +2848,6 @@ a.account__display-name {
&__pane {
height: 100%;
overflow: hidden;
pointer-events: none;
display: flex;
justify-content: flex-end;
min-width: 285px;
@ -2860,7 +2859,6 @@ a.account__display-name {
&__inner {
position: fixed;
width: 285px;
pointer-events: auto;
height: 100%;
}
}

View File

@ -1,8 +1,8 @@
# frozen_string_literal: true
class PollOptionsValidator < ActiveModel::Validator
MAX_OPTIONS = 4
MAX_OPTION_CHARS = 50
MAX_OPTIONS = (ENV['MAX_POLL_OPTIONS'] || 4).to_i
MAX_OPTION_CHARS = (ENV['MAX_POLL_OPTION_CHARS'] || 50).to_i
def validate(poll)
poll.errors.add(:options, I18n.t('polls.errors.too_few_options')) unless poll.options.size > 1