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

Always apply isolation when u:dir is set #942

Merged
merged 3 commits into from
Nov 18, 2024
Merged

Always apply isolation when u:dir is set #942

merged 3 commits into from
Nov 18, 2024

Conversation

eemeli
Copy link
Collaborator

@eemeli eemeli commented Nov 17, 2024

See #916 for some of the preceding discussion.

In addition to changing the directionality of a placeholder, we should treat an explicitly set u:dir option as a request to isolate the placeholder, even if the direction matches the message's direction.

This requires a small change to our default bidi strategy.

The inheritance of the option is not specified when it's set on a value that's used as a function operand, so e.g. a message like

.local $world = {world :string u:dir=ltr}
{{hello {$world :string}}}

might or might not have the placeholder isolated (depending on the implementation), while it would always be isolated in messages like

hello {world :string u:dir=ltr}

and

.local $world = {world :string u:dir=ltr}
{{hello {$world}}}

@eemeli eemeli added Agenda+ Requested for upcoming teleconference formatting labels Nov 17, 2024
@eemeli eemeli requested a review from aphillips November 17, 2024 14:01
Copy link
Member

@aphillips aphillips left a comment

Choose a reason for hiding this comment

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

I think this is an important and quite useful improvement.

@@ -102,6 +105,25 @@
{ "type": "bidiIsolation", "value": "\u2069" }
]
},
{
"src": ".local $world = {world :string u:dir=ltr u:id=foo} {{hello {$world}}}",
Copy link
Member

Choose a reason for hiding this comment

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

This is intended as the transitivity text, I think? Should we have one with mulitple .local declarations? or .input followed by .local?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Eh, not sure if it's necessary. I think the important part is making sure that moving the option from the placeholder to a declaration works.

spec/u-namespace.md Outdated Show resolved Hide resolved
Co-authored-by: Addison Phillips <[email protected]>
Copy link
Member

@aphillips aphillips left a comment

Choose a reason for hiding this comment

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

LGTM

@aphillips aphillips merged commit 5ca5247 into main Nov 18, 2024
2 checks passed
@aphillips aphillips deleted the udir-isolates branch November 18, 2024 17:58
eemeli added a commit to messageformat/messageformat that referenced this pull request Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Agenda+ Requested for upcoming teleconference formatting
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants