Open
Conversation
Alt text config implementation: - Set in .env (with example in .env.production.sample) - Set in Rails in `MediaAttachment` model as `MAX_DESCRIPTION_LENGTH` by reading from ENV - Read by Rails in `initial_state_serializer` and `instance_serializer` for both v1 and v2 apis - Transferred to js from initialState as `maxAltTextChars` - Used in focal_point_modal to display. API Changes: - `/api/v1/instance` - `max_alt_text_characters` - `configuration.media_attachments.max_alt_text_characters` - `/api/instance` - `configuration.media_attachments.max_alt_text_characters`
|
This pull request has merge conflicts that must be resolved before it can be merged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Alt text should be able to be one million characters long. This pull requests lets the alt text limit be set from .env as
MAX_ALT_TEXT_CHARS(defaulting to the current 1500.Also added to
/api/instanceand/api/v1/instanceAlt text config implementation:
MediaAttachmentmodel asMAX_DESCRIPTION_LENGTHby reading from ENVinitial_state_serializerandinstance_serializerfor both v1 and v2 apismaxAltTextCharsAPI Changes:
/api/v1/instancemax_alt_text_charactersconfiguration.media_attachments.max_alt_text_characters/api/instanceconfiguration.media_attachments.max_alt_text_charactersAlso fixed an unexplained reversion in mastodon@71f2b95 that invalidates alt text that is longer than the local limit.