-
Notifications
You must be signed in to change notification settings - Fork 82
[OSCI] Adding props for shrink and basis for OuiFlexItem #1126
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
Open
BigSamu
wants to merge
29
commits into
opensearch-project:main
Choose a base branch
from
BigSamu:feat/props-ouiFlexItem
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
d7426fe
adding shrink and basis props for OuiFlexItem
BigSamu 0cf7375
adding tests for shrink and basis props added in OuiFlexItem
BigSamu fe28556
changing API for values accepted for basis prop and updating snapshoo…
BigSamu d5dd922
updating CHANGELOG.md and testing snapshoots
BigSamu a4362a8
Merge branch 'main' into feat/props-ouiFlexItem
BigSamu 3eb7413
changing location of chanelog description for this issue into correct…
BigSamu 428ef63
fixing typo lines 122 and 123 flexItem.tsx
BigSamu eb68e2c
fixing typo line 55 file _flex_item.scss
BigSamu 9665bba
updating jest unit-testing snapshoots
BigSamu b8ec51e
changing default values for shrink and basis props
BigSamu 8abdb38
removing class .ouiFlexItem--flexShrinkZero from _flex_item.scss and …
BigSamu 34fad9a
updating documentation for shrink and basis props in OuiFlexItem
BigSamu 4674627
updating jest unit-testing snapshoots
BigSamu 29aff44
removing extra line CHANELOG.md
BigSamu 74354d0
Merge branch 'main' into feat/props-ouiFlexItem
BigSamu 6914c7d
refactoring code adding after suggestions from code review in last PR
BigSamu 345fd2d
adding snapshoots for unit-testing
BigSamu e74f52e
Merge branch 'main' into feat/props-ouiFlexItem
BigSamu 8d6e8fa
Adding tests for combinatios of grow, shrink and basis values and res…
BigSamu c58f11a
removing property flex-basis:auto from CSS class ouiFlexItem--flexShr…
BigSamu 66c8e9e
modifiying logic for prop 'basis' according what was requested by mai…
BigSamu a539b13
Merge branch 'main' into feat/props-ouiFlexItem
BigSamu fb97c87
Merge branch 'main' into feat/props-ouiFlexItem
BigSamu e4e0aff
Update src-docs/src/views/flex/flex_basis_string.tsx
BigSamu 2341eab
Update src-docs/src/views/flex/flex_shrink_numeric.tsx
BigSamu ceed1ce
updating text for examples of Basis in flex items
BigSamu 01e94ea
adding 0 item for GROW_SIZES and SHRINK_SIZES arrays and FlexItemGrow…
BigSamu 03ce677
make 'true' and 'false' options for types FlexItemGrowSize and FlexIt…
BigSamu 9fd51c9
updating snapshoots
BigSamu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,41 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import React from 'react'; | ||
|
||
import { OuiFlexGroup, OuiFlexItem } from '../../../../src/components/flex'; | ||
|
||
export default () => ( | ||
<div> | ||
<OuiFlexGroup> | ||
<OuiFlexItem basis={'auto'}> | ||
auto | ||
<br /> | ||
<br /> | ||
Varies based on content size or width/height property | ||
</OuiFlexItem> | ||
<OuiFlexItem basis={'fit-content'}> | ||
fit-content | ||
<br /> | ||
<br /> | ||
Sizes the item based on the content's width but within the | ||
container. | ||
</OuiFlexItem> | ||
<OuiFlexItem basis={'max-content'}> | ||
max-content | ||
<br /> | ||
<br /> | ||
Sizes the item to be as large as the content's maximum width. | ||
</OuiFlexItem> | ||
<OuiFlexItem basis={'min-content'}> | ||
min-content | ||
<br /> | ||
<br /> | ||
Sizes the item to be as small as the content's minimum width | ||
without breaking. | ||
</OuiFlexItem> | ||
</OuiFlexGroup> | ||
</div> | ||
); |
This file contains hidden or 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 hidden or 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,45 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import React from 'react'; | ||
|
||
import { OuiFlexGroup, OuiFlexItem } from '../../../../src/components/flex'; | ||
import { OuiSpacer } from '../../../../src/components/spacer'; | ||
|
||
export default () => ( | ||
<div> | ||
<OuiFlexGroup> | ||
<OuiFlexItem grow={false} shrink={1}> | ||
Extensive Text Extensive Text Extensive Text | ||
BigSamu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</OuiFlexItem> | ||
<OuiFlexItem grow={false} shrink={2}> | ||
Extensive Text Extensive Text Extensive Text | ||
</OuiFlexItem> | ||
<OuiFlexItem grow={false} shrink={4}> | ||
Extensive Text Extensive Text Extensive Text | ||
</OuiFlexItem> | ||
<OuiFlexItem grow={false} shrink={8}> | ||
Extensive Text Extensive Text Extensive Text | ||
</OuiFlexItem> | ||
</OuiFlexGroup> | ||
|
||
<OuiSpacer /> | ||
|
||
<OuiFlexGroup> | ||
<OuiFlexItem shrink={1} basis={'auto'}> | ||
Extensive Text Extensive Text Extensive Text | ||
</OuiFlexItem> | ||
<OuiFlexItem shrink={2} basis={'auto'}> | ||
Extensive Text Extensive Text Extensive Text | ||
</OuiFlexItem> | ||
<OuiFlexItem shrink={4} basis={'auto'}> | ||
Extensive Text Extensive Text Extensive Text | ||
</OuiFlexItem> | ||
<OuiFlexItem shrink={8} basis={'auto'}> | ||
Extensive Text Extensive Text Extensive Text | ||
</OuiFlexItem> | ||
</OuiFlexGroup> | ||
</div> | ||
); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.