-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for RTL text direction for template content (#2321)
* feat(rtl): add new text direction column to db, model * feat(rtl): add `text_direction_rtl` property to `TemplateSchema` * feat(rtl): add `text_direction_rtl` property to the list of properties checked to see if a template changed * chore: formatting * tests(rtl): add tests to ensure template updates when text direction changes * chore: update utils dep * chore: update poetry lock file * test(rtl): add tests for creating templates * chore: bump utils * chore: update poetry.lock
- Loading branch information
1 parent
00c6286
commit ae05c9f
Showing
8 changed files
with
132 additions
and
195 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
""" | ||
Revision ID: 0461_add_rtl_column_templates | ||
Revises: 0460_new_service_columns | ||
Create Date: 2024-06-27 13:32:00 | ||
""" | ||
import sqlalchemy as sa | ||
from alembic import op | ||
|
||
revision = "0461_add_rtl_column_templates" | ||
down_revision = "0460_new_service_columns" | ||
|
||
|
||
def upgrade(): | ||
# Add the new column to the templates table | ||
op.add_column("templates", sa.Column("text_direction_rtl", sa.Boolean(), nullable=False, server_default=sa.false())) | ||
|
||
# Add the new column to the templates_history table | ||
op.add_column("templates_history", sa.Column("text_direction_rtl", sa.Boolean(), nullable=False, server_default=sa.false())) | ||
|
||
|
||
def downgrade(): | ||
# Remove the column from the templates table | ||
op.drop_column("templates", "text_direction_rtl") | ||
|
||
# Remove the column from the templates_history table | ||
op.drop_column("templates_history", "text_direction_rtl") |
Oops, something went wrong.