-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PLAY-1581] Height, minHeight, maxHeight for Card, Flex, FlexItem, & …
…Dialog (#3749) **What does this PR do?** A clear and concise description with your runway ticket url. https://runway.powerhrg.com/backlog_items/PLAY-1581 In order to achieve the height functionality that the story demanded, we introduced a new utility function for handling specific global properties that require _dynamic_ values (any px, %, or vh, etc). This has been on our Todo list for a looooong time, and I'm so happy we were able to knock out the work here in this story! The work in this PR adds the following props for react: **minHeight, maxHeight, height** for React The work in this PR adds the following props for rails: **min_height, max_height, height** for Rails For now, these are applied to a few of our utility kits: Card, Flex, FlexItem, Dialog We have a path forward to apply to all other kits, but for now this work unblocks the Template work for the PB-In-Nitro team, without shipping changes to every kit which would move this to a much higher risk-level. **Screenshots:** Screenshots to visualize your addition/change **How to test?** Steps to confirm the desired behavior: 1. Go to dialog, flex, flex_item, or card. 2. Add a height prop with a value. 3. See your styles get applied. #### Checklist: - [X] **LABELS** Add a label: `enhancement`, `bug`, `improvement`, `new kit`, `deprecated`, or `breaking`. See [Changelog & Labels](https://github.com/powerhome/playbook/wiki/Changelog-&-Labels) for details. - [X] **DEPLOY** I have added the `milano` label to show I'm ready for a review. - [X] **TESTS** I have added test coverage to my code.
- Loading branch information
1 parent
f4c5e2f
commit d7b8e5e
Showing
10 changed files
with
95 additions
and
17 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
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 |
---|---|---|
@@ -1,8 +1,5 @@ | ||
<%= content_tag(:div, | ||
id: object.id, | ||
data: object.data, | ||
class: object.classname, | ||
style: object.style_value, | ||
**combined_html_options) do %> | ||
<%= pb_content_tag(:div, | ||
style: object.inline_styles | ||
) do %> | ||
<%= content.presence %> | ||
<% end %> |
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 |
---|---|---|
@@ -1,4 +1,7 @@ | ||
export default [ | ||
"minHeight", | ||
"maxHeight", | ||
"height", | ||
"left", | ||
"bottom", | ||
"right", | ||
|
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