-
-
Notifications
You must be signed in to change notification settings - Fork 36
Open/close design: Add more alternatives #517
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
Conversation
4169d50
to
d58839d
Compare
We do support using the exact HTML syntax as "just a literal" because we support literal text. Nothing we do will prevent (or should prevent) people from writing messages like:
or even:
This has obvious problems for translators, for which a lot of tooling exists (but which could be considered less effective than something supported by the syntax). And it means different handling if you're running in JS. But it's not "wrong". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is useful to document these options.
Agreed. I wasn't trying to say that it was wrong, but instead I wanted to capture the discussion about why -- even if it's possible -- it's also not enough for some of our use-cases. The really interesting thing to me, however, is that a lot of use-cases that we listed in the doc can in fact be satisfied by the "do nothing" approach. This gives me pause. Things start to get messy once we consider formatting to parts: Perhaps we're missing a few requirements? |
Actually, format-to-parts (FTP) and the "click" example is really interesting. FTP would make that into three parts:
The two text fragments cannot be turned into HTML cleanly on their own--only when the whole
Maybe, but maybe not. The compromise in Seville was basically: no operands, no to-string interpretation by default (implementations may provide one). Not everyone agrees about the need for or importance of spannables nor about how to handle spannables. Implementations that don't support spannables could evaporate them in FTP or, as Eemeli suggests, return a "part" that the consumer can do whatever they want with. One thing I kind of like about the proposal is that it can support straightforward conversion to HTML/DOM without resorting to a registry of tags (there is no need to list the supported tags): the "function" is the HTML tag and the options are the attributes. You can create a DOM node out of it and fill it with content ("parts") until you see the close. You can call |
Co-authored-by: Addison Phillips <[email protected]>
Co-authored-by: Addison Phillips <[email protected]>
Co-authored-by: Addison Phillips <[email protected]>
Co-authored-by: Eemeli Aro <[email protected]>
I'd like for us to merge this, as it finally reflects the starting point for last week's deliberations. Then I can file another PR on top of this that reflects the results of those deliberations, and the preliminary consensus on @aphillips Your change-requested review is blocking my ability to merge this, as I don't have admin access. Could you do it? We can still iterate on the doc in the next PR. |
@eemeli Done |
We should document that we considered using the exact HTML syntax, either completely not supported or parsed as part of the message.
I'm filing this PR as a draft, please feel free to extend it.