-
Notifications
You must be signed in to change notification settings - Fork 541
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
New spacing model #462
Comments
Removes separation and introduces spacing/separator See issue #462
Sounds like that might address #136 as you were saying. |
@Anbare Yes, and if you can spare a few minutes, it would be great if you could validate that; I have a pull request with the changes. |
Definitely, I can try it out once it's in the HTML visualizer, just ping me again when that's live (I've never built the site locally so I'd prefer to use a pre-built version rather than learning how to build the website) |
The thing is I can't really merge it yet - technically this is a "proposed change." Any chance you could pull the code on the finalize-html branch and try the visualizer locally? |
I might be able to try that tomorrow, probably won't have time today |
* Some minor fixes, and introduce actionStyle It is now possible to explicitly select the button style ("link" or "button") in ActionSet elements and on the card itself. * Fix ChoiceSetInput.value throwing in unrendered ShowCardAction cards * Add a way to pre-expand a single ShowCardAction * New spacing model Removes separation and introduces spacing/separator See issue #462
* Some minor fixes, and introduce actionStyle It is now possible to explicitly select the button style ("link" or "button") in ActionSet elements and on the card itself. * Fix ChoiceSetInput.value throwing in unrendered ShowCardAction cards * Add a way to pre-expand a single ShowCardAction * New spacing model Removes separation and introduces spacing/separator See issue #462 * Small fix for Image (make size "auto" by default) Some cleanup
Thanks for typing this one up David, looks great. The v-team reviewed this proposal last week and OK'd it. If anyone sees any red flags please speak up asap |
I think it would be useful to add a checkbox for when the documentation is updated along with the different platform implementation status. |
Good point, done. |
* Some minor fixes, and introduce actionStyle It is now possible to explicitly select the button style ("link" or "button") in ActionSet elements and on the card itself. * Fix ChoiceSetInput.value throwing in unrendered ShowCardAction cards * Add a way to pre-expand a single ShowCardAction * New spacing model Removes separation and introduces spacing/separator See issue #462 * Small fix for Image (make size "auto" by default) Some cleanup * Add backward compat for "separation" and "Column.size" To make things easier, the renderer will for now accept both the old "separation" and new "spacing" as well as the old "Column.size" and new "Column.width". When the old properties are used, the visualizer will display an error indicating that the property has been deprecated and will be removed.
* Some minor fixes, and introduce actionStyle It is now possible to explicitly select the button style ("link" or "button") in ActionSet elements and on the card itself. * Fix ChoiceSetInput.value throwing in unrendered ShowCardAction cards * Add a way to pre-expand a single ShowCardAction * New spacing model Removes separation and introduces spacing/separator See issue #462 * Small fix for Image (make size "auto" by default) Some cleanup * Add backward compat for "separation" and "Column.size" To make things easier, the renderer will for now accept both the old "separation" and new "spacing" as well as the old "Column.size" and new "Column.width". When the old properties are used, the visualizer will display an error indicating that the property has been deprecated and will be removed. * Allow Container.backgroundImage as a simple string This makes it easier to specify a stretching background image and ensures backward compatibility with the previous model
@bekao raised an interesting question if |
Sounds good to me.
|
Who's going to write the spec for this? |
Along the same lines, maybe we should support our various foreground colors for separator. I know of at least one scenario where the separator should be in the accent color. So in the end, the separator property would be specified like this:
For no separator, just omit the property (or maybe we have a "none" value for thickness.) |
* Some minor fixes, and introduce actionStyle It is now possible to explicitly select the button style ("link" or "button") in ActionSet elements and on the card itself. * Fix ChoiceSetInput.value throwing in unrendered ShowCardAction cards * Add a way to pre-expand a single ShowCardAction * New spacing model Removes separation and introduces spacing/separator See issue #462 * Small fix for Image (make size "auto" by default) Some cleanup * Add backward compat for "separation" and "Column.size" To make things easier, the renderer will for now accept both the old "separation" and new "spacing" as well as the old "Column.size" and new "Column.width". When the old properties are used, the visualizer will display an error indicating that the property has been deprecated and will be removed. * Allow Container.backgroundImage as a simple string This makes it easier to specify a stretching background image and ensures backward compatibility with the previous model * Remove TextColor.dark and TextColor.light, add TextColor.default
* Some minor fixes, and introduce actionStyle It is now possible to explicitly select the button style ("link" or "button") in ActionSet elements and on the card itself. * Fix ChoiceSetInput.value throwing in unrendered ShowCardAction cards * Add a way to pre-expand a single ShowCardAction * New spacing model Removes separation and introduces spacing/separator See issue #462 * Small fix for Image (make size "auto" by default) Some cleanup * Add backward compat for "separation" and "Column.size" To make things easier, the renderer will for now accept both the old "separation" and new "spacing" as well as the old "Column.size" and new "Column.width". When the old properties are used, the visualizer will display an error indicating that the property has been deprecated and will be removed. * Allow Container.backgroundImage as a simple string This makes it easier to specify a stretching background image and ensures backward compatibility with the previous model * Remove TextColor.dark and TextColor.light, add TextColor.default * Fix image sizing logic for auto and stretch Fix background container color being applied when it shouldn't
#612) * Some minor fixes, and introduce actionStyle It is now possible to explicitly select the button style ("link" or "button") in ActionSet elements and on the card itself. * Fix ChoiceSetInput.value throwing in unrendered ShowCardAction cards * Add a way to pre-expand a single ShowCardAction * New spacing model Removes separation and introduces spacing/separator See issue #462 * Small fix for Image (make size "auto" by default) Some cleanup * Add backward compat for "separation" and "Column.size" To make things easier, the renderer will for now accept both the old "separation" and new "spacing" as well as the old "Column.size" and new "Column.width". When the old properties are used, the visualizer will display an error indicating that the property has been deprecated and will be removed. * Allow Container.backgroundImage as a simple string This makes it easier to specify a stretching background image and ensures backward compatibility with the previous model * Remove TextColor.dark and TextColor.light, add TextColor.default * Fix image sizing logic for auto and stretch Fix background container color being applied when it shouldn't * Remove inlineEdgeToEdge action mode. "inline" is enough.
@dclaux @matthidinger With this change we now have the following in our action config:
Is there a reason we want spacing to be the enum and buttonSpacing to be a number? Seems like we should use the enum for buttonSpacing as well. |
For v1.0 I've updated the spec that separator is back to being a bool instead of an object. We will add the object back in a future release. Parsers should parse the bool and populate the Separator object with an IsVisible property. "separator": true becomes "separator": { "separator": falsebecomes "separator": { |
* Some minor fixes, and introduce actionStyle It is now possible to explicitly select the button style ("link" or "button") in ActionSet elements and on the card itself. * Fix ChoiceSetInput.value throwing in unrendered ShowCardAction cards * Add a way to pre-expand a single ShowCardAction * New spacing model Removes separation and introduces spacing/separator See issue #462 * Small fix for Image (make size "auto" by default) Some cleanup * Add backward compat for "separation" and "Column.size" To make things easier, the renderer will for now accept both the old "separation" and new "spacing" as well as the old "Column.size" and new "Column.width". When the old properties are used, the visualizer will display an error indicating that the property has been deprecated and will be removed. * Allow Container.backgroundImage as a simple string This makes it easier to specify a stretching background image and ensures backward compatibility with the previous model * Remove TextColor.dark and TextColor.light, add TextColor.default * Fix image sizing logic for auto and stretch Fix background container color being applied when it shouldn't * Remove inlineEdgeToEdge action mode. "inline" is enough. * Change "normal" enum values into "default" and add parse warnings
* Some minor fixes, and introduce actionStyle It is now possible to explicitly select the button style ("link" or "button") in ActionSet elements and on the card itself. * Fix ChoiceSetInput.value throwing in unrendered ShowCardAction cards * Add a way to pre-expand a single ShowCardAction * New spacing model Removes separation and introduces spacing/separator See issue #462 * Small fix for Image (make size "auto" by default) Some cleanup * Add backward compat for "separation" and "Column.size" To make things easier, the renderer will for now accept both the old "separation" and new "spacing" as well as the old "Column.size" and new "Column.width". When the old properties are used, the visualizer will display an error indicating that the property has been deprecated and will be removed. * Allow Container.backgroundImage as a simple string This makes it easier to specify a stretching background image and ensures backward compatibility with the previous model * Remove TextColor.dark and TextColor.light, add TextColor.default * Fix image sizing logic for auto and stretch Fix background container color being applied when it shouldn't * Remove inlineEdgeToEdge action mode. "inline" is enough. * Change "normal" enum values into "default" and add parse warnings * Fix Input.Toggle valueOn and valueOff parsing
* Some minor fixes, and introduce actionStyle It is now possible to explicitly select the button style ("link" or "button") in ActionSet elements and on the card itself. * Fix ChoiceSetInput.value throwing in unrendered ShowCardAction cards * Add a way to pre-expand a single ShowCardAction * New spacing model Removes separation and introduces spacing/separator See issue #462 * Small fix for Image (make size "auto" by default) Some cleanup * Add backward compat for "separation" and "Column.size" To make things easier, the renderer will for now accept both the old "separation" and new "spacing" as well as the old "Column.size" and new "Column.width". When the old properties are used, the visualizer will display an error indicating that the property has been deprecated and will be removed. * Allow Container.backgroundImage as a simple string This makes it easier to specify a stretching background image and ensures backward compatibility with the previous model * Remove TextColor.dark and TextColor.light, add TextColor.default * Fix image sizing logic for auto and stretch Fix background container color being applied when it shouldn't * Remove inlineEdgeToEdge action mode. "inline" is enough. * Change "normal" enum values into "default" and add parse warnings * Fix Input.Toggle valueOn and valueOff parsing * Remove preExpandSingleShowCardAction option from HostConfig
* Some minor fixes, and introduce actionStyle It is now possible to explicitly select the button style ("link" or "button") in ActionSet elements and on the card itself. * Fix ChoiceSetInput.value throwing in unrendered ShowCardAction cards * Add a way to pre-expand a single ShowCardAction * New spacing model Removes separation and introduces spacing/separator See issue #462 * Small fix for Image (make size "auto" by default) Some cleanup * Add backward compat for "separation" and "Column.size" To make things easier, the renderer will for now accept both the old "separation" and new "spacing" as well as the old "Column.size" and new "Column.width". When the old properties are used, the visualizer will display an error indicating that the property has been deprecated and will be removed. * Allow Container.backgroundImage as a simple string This makes it easier to specify a stretching background image and ensures backward compatibility with the previous model * Remove TextColor.dark and TextColor.light, add TextColor.default * Fix image sizing logic for auto and stretch Fix background container color being applied when it shouldn't * Remove inlineEdgeToEdge action mode. "inline" is enough. * Change "normal" enum values into "default" and add parse warnings * Fix Input.Toggle valueOn and valueOff parsing * Remove preExpandSingleShowCardAction option from HostConfig * Add Outlook host container Remove support for "link buttons" style
* Some minor fixes, and introduce actionStyle It is now possible to explicitly select the button style ("link" or "button") in ActionSet elements and on the card itself. * Fix ChoiceSetInput.value throwing in unrendered ShowCardAction cards * Add a way to pre-expand a single ShowCardAction * New spacing model Removes separation and introduces spacing/separator See issue #462 * Small fix for Image (make size "auto" by default) Some cleanup * Add backward compat for "separation" and "Column.size" To make things easier, the renderer will for now accept both the old "separation" and new "spacing" as well as the old "Column.size" and new "Column.width". When the old properties are used, the visualizer will display an error indicating that the property has been deprecated and will be removed. * Allow Container.backgroundImage as a simple string This makes it easier to specify a stretching background image and ensures backward compatibility with the previous model * Remove TextColor.dark and TextColor.light, add TextColor.default * Fix image sizing logic for auto and stretch Fix background container color being applied when it shouldn't * Remove inlineEdgeToEdge action mode. "inline" is enough. * Change "normal" enum values into "default" and add parse warnings * Fix Input.Toggle valueOn and valueOff parsing * Remove preExpandSingleShowCardAction option from HostConfig * Add Outlook host container Remove support for "link buttons" style * Fix incorrect height of ChoiceSet input
* Some minor fixes, and introduce actionStyle It is now possible to explicitly select the button style ("link" or "button") in ActionSet elements and on the card itself. * Fix ChoiceSetInput.value throwing in unrendered ShowCardAction cards * Add a way to pre-expand a single ShowCardAction * New spacing model Removes separation and introduces spacing/separator See issue #462 * Small fix for Image (make size "auto" by default) Some cleanup * Add backward compat for "separation" and "Column.size" To make things easier, the renderer will for now accept both the old "separation" and new "spacing" as well as the old "Column.size" and new "Column.width". When the old properties are used, the visualizer will display an error indicating that the property has been deprecated and will be removed. * Allow Container.backgroundImage as a simple string This makes it easier to specify a stretching background image and ensures backward compatibility with the previous model * Remove TextColor.dark and TextColor.light, add TextColor.default * Fix image sizing logic for auto and stretch Fix background container color being applied when it shouldn't * Remove inlineEdgeToEdge action mode. "inline" is enough. * Change "normal" enum values into "default" and add parse warnings * Fix Input.Toggle valueOn and valueOff parsing * Remove preExpandSingleShowCardAction option from HostConfig * Add Outlook host container Remove support for "link buttons" style * Fix incorrect height of ChoiceSet input * Fix selectAction not working on ColumnSet
…f specified) (#765) * Some minor fixes, and introduce actionStyle It is now possible to explicitly select the button style ("link" or "button") in ActionSet elements and on the card itself. * Fix ChoiceSetInput.value throwing in unrendered ShowCardAction cards * Add a way to pre-expand a single ShowCardAction * New spacing model Removes separation and introduces spacing/separator See issue #462 * Small fix for Image (make size "auto" by default) Some cleanup * Add backward compat for "separation" and "Column.size" To make things easier, the renderer will for now accept both the old "separation" and new "spacing" as well as the old "Column.size" and new "Column.width". When the old properties are used, the visualizer will display an error indicating that the property has been deprecated and will be removed. * Allow Container.backgroundImage as a simple string This makes it easier to specify a stretching background image and ensures backward compatibility with the previous model * Remove TextColor.dark and TextColor.light, add TextColor.default * Fix image sizing logic for auto and stretch Fix background container color being applied when it shouldn't * Remove inlineEdgeToEdge action mode. "inline" is enough. * Change "normal" enum values into "default" and add parse warnings * Fix Input.Toggle valueOn and valueOff parsing * Remove preExpandSingleShowCardAction option from HostConfig * Add Outlook host container Remove support for "link buttons" style * Fix incorrect height of ChoiceSet input * Fix selectAction not working on ColumnSet * Fix ActionSet not honoring horizontalAlignment (overrides HostConfig is specified)
* Some minor fixes, and introduce actionStyle It is now possible to explicitly select the button style ("link" or "button") in ActionSet elements and on the card itself. * Fix ChoiceSetInput.value throwing in unrendered ShowCardAction cards * Add a way to pre-expand a single ShowCardAction * New spacing model Removes separation and introduces spacing/separator See issue #462 * Small fix for Image (make size "auto" by default) Some cleanup * Add backward compat for "separation" and "Column.size" To make things easier, the renderer will for now accept both the old "separation" and new "spacing" as well as the old "Column.size" and new "Column.width". When the old properties are used, the visualizer will display an error indicating that the property has been deprecated and will be removed. * Allow Container.backgroundImage as a simple string This makes it easier to specify a stretching background image and ensures backward compatibility with the previous model * Remove TextColor.dark and TextColor.light, add TextColor.default * Fix image sizing logic for auto and stretch Fix background container color being applied when it shouldn't * Remove inlineEdgeToEdge action mode. "inline" is enough. * Change "normal" enum values into "default" and add parse warnings * Fix Input.Toggle valueOn and valueOff parsing * Remove preExpandSingleShowCardAction option from HostConfig * Add Outlook host container Remove support for "link buttons" style * Fix incorrect height of ChoiceSet input * Fix selectAction not working on ColumnSet * Fix ActionSet not honoring horizontalAlignment (overrides HostConfig is specified) * Support explicit orientation on ActionSet * Remove comments * Support for explicit orientation in ActionSet - cleanup
* Some minor fixes, and introduce actionStyle It is now possible to explicitly select the button style ("link" or "button") in ActionSet elements and on the card itself. * Fix ChoiceSetInput.value throwing in unrendered ShowCardAction cards * Add a way to pre-expand a single ShowCardAction * New spacing model Removes separation and introduces spacing/separator See issue #462 * Small fix for Image (make size "auto" by default) Some cleanup * Add backward compat for "separation" and "Column.size" To make things easier, the renderer will for now accept both the old "separation" and new "spacing" as well as the old "Column.size" and new "Column.width". When the old properties are used, the visualizer will display an error indicating that the property has been deprecated and will be removed. * Allow Container.backgroundImage as a simple string This makes it easier to specify a stretching background image and ensures backward compatibility with the previous model * Remove TextColor.dark and TextColor.light, add TextColor.default * Fix image sizing logic for auto and stretch Fix background container color being applied when it shouldn't * Remove inlineEdgeToEdge action mode. "inline" is enough. * Change "normal" enum values into "default" and add parse warnings * Fix Input.Toggle valueOn and valueOff parsing * Remove preExpandSingleShowCardAction option from HostConfig * Add Outlook host container Remove support for "link buttons" style * Fix incorrect height of ChoiceSet input * Fix selectAction not working on ColumnSet * Fix ActionSet not honoring horizontalAlignment (overrides HostConfig is specified) * Support explicit orientation on ActionSet * Remove comments * Support for explicit orientation in ActionSet - cleanup * Add support for verticalContentAlignment in containers
…ok (#815) * Some minor fixes, and introduce actionStyle It is now possible to explicitly select the button style ("link" or "button") in ActionSet elements and on the card itself. * Fix ChoiceSetInput.value throwing in unrendered ShowCardAction cards * Add a way to pre-expand a single ShowCardAction * New spacing model Removes separation and introduces spacing/separator See issue #462 * Small fix for Image (make size "auto" by default) Some cleanup * Add backward compat for "separation" and "Column.size" To make things easier, the renderer will for now accept both the old "separation" and new "spacing" as well as the old "Column.size" and new "Column.width". When the old properties are used, the visualizer will display an error indicating that the property has been deprecated and will be removed. * Allow Container.backgroundImage as a simple string This makes it easier to specify a stretching background image and ensures backward compatibility with the previous model * Remove TextColor.dark and TextColor.light, add TextColor.default * Fix image sizing logic for auto and stretch Fix background container color being applied when it shouldn't * Remove inlineEdgeToEdge action mode. "inline" is enough. * Change "normal" enum values into "default" and add parse warnings * Fix Input.Toggle valueOn and valueOff parsing * Remove preExpandSingleShowCardAction option from HostConfig * Add Outlook host container Remove support for "link buttons" style * Fix incorrect height of ChoiceSet input * Fix selectAction not working on ColumnSet * Fix ActionSet not honoring horizontalAlignment (overrides HostConfig is specified) * Support explicit orientation on ActionSet * Remove comments * Support for explicit orientation in ActionSet - cleanup * Add support for verticalContentAlignment in containers * Fix visualizer CSS which had merge garbage in them * Add support for background color on Image for Outlook container * Add support for Column.pixelWidth for Outlook
Implementation status
Design proposal
In order to accommodate for more scenarios, we propose to make it possible to select from a wider ranger of spacing between elements, so as to achieve more subtle or more marked separations. At the same time, we propose to separate the concept of "separator" from spacing itself (currently, to get a separator line, one needs to use the "strong" separation.
So we propose the following:
Card schema changes
Removed
New properties on every element
Spacing enumeration
Spacing = "none" | "small" | "default" | "medium" | "large" | "extraLarge" | "padding"
The padding value means "same as card padding". This is to help card authors design cards where, say, two columns are separated by the same spacing as there is padding around the card.
Separator type
Separator = true | false
V1.0 parser requirements
For v1.0 I've updated the spec that separator is back to being a bool instead of an object. We will add the object back in a future release.
Parsers should parse the bool and populate the Separator object with an IsVisible property.
"separator": true becomes
"separator": {
"isVisible": true,
"thickness": "default",
"color": "default
}
"separator": false becomes
"separator": {
"isVisible": false,
"thickness": "default",
"color": "default
}
HostConfig changes
Removed
Currently some HostConfig elements only contain a separation definition. This change removes these separation definitions and therefore these elements would be empty. They will therefore be removed as a result. The elements in question are:
Added
Spacing definitions at the root level:
spacing property on actions:
Examples
HostConfig example
Spacing usage examples
The text was updated successfully, but these errors were encountered: