-
Notifications
You must be signed in to change notification settings - Fork 2.8k
chore(Component selector): Move to its own package #34244
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
Draft
jurokapsiar
wants to merge
172
commits into
master
Choose a base branch
from
jukapsia/component-selector
base: master
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.
Draft
Changes from all commits
Commits
Show all changes
172 commits
Select commit
Hold shift + click to select a range
1d4b550
Initial commit for Component Selector
adamsamec 86e77de
initial decision tree
kolaps33 16dd110
Proper nesting in conditional rendering
adamsamec 4ea181f
create method updateDecisionProps
kolaps33 1499616
fix types
kolaps33 15a6609
adding jsons
kolaps33 f9ede7c
adding styles + change to radiogroup
kolaps33 41962bf
import jsons, merging base objects
kolaps33 8e779a0
Refactor multiple decision states into single object state and fix er…
adamsamec 56923c5
Do not include interactive and composition decisions in the selected …
adamsamec 674d78a
Add navigation by decision
adamsamec 9d96ca2
getComponent update JSONS
kolaps33 0a80ea9
fix adding prop from radio
kolaps33 ff30825
removing composition
kolaps33 10d4d3a
amend jsons add static or interactive
kolaps33 068fec3
adding interactivity to decisions array
kolaps33 ab45763
Fix filtering of interactive/static components
adamsamec 7dc49cd
Group checkboxes into group role
adamsamec 6eed75e
Clear decisions from the same category upon radio selection
adamsamec 399eec6
fix category, adding more components jsons
kolaps33 17063ca
last fixes to get category
kolaps33 f8aa74d
add label for checkboxes, add number of found comp
kolaps33 91ac0e2
add weight for heading
kolaps33 d169a18
adding margin for found text
kolaps33 3082b47
fix typo in list
kolaps33 55a90ee
adding components constant
kolaps33 e7048bc
Merge branch 'master' into adamsamec/component-selector
e4c5175
Add component example URL retrieval function
bab3cf9
Retrieve default example when no example is given
a3eef07
adding according and component selector grid
mituron a02f15b
Reformat JSON component definitions, add attributes and questions
4715ebc
Merge branch 'adamsamec/component-selector' of https://github.com/ada…
b096caf
Use new names of component definitions
e8bb36c
fix name of table base
mituron 9af45d4
amending headings
mituron 7de3af0
amending headings of second accordion
mituron 891f3cc
Restructure groups and questions
76243c4
fix merging of attribute between child and base JSON
mituron 8844e1b
Add attributes to components definitions from questions
3389d02
Merge branch 'adamsamec/component-selector' of https://github.com/ada…
d5043ef
show components in results where are selected
mituron af10011
change URL to production, amend link creation in utils
mituron 4d3587b
Add folder for components defs and generate proper URL
6a49974
Adding questionnaire to Selector | Removed duplicate Selector page | …
hanys7 a5f18f3
removing according, behaviour section started
mituron fff8928
adding behaviours toggle buttons
mituron d3b766a
removing radio and adding toggle buttons
mituron 0ef7583
fix wrong import
mituron 289a884
Merge branch 'master' into adamsamec/component-selector
ab50b19
Changes in component def attributes
2e97359
dipslay questions based on the logic
mituron fe8ed88
Add InfoLabel and Tooltip definitions and fixes
e406446
Merge branch 'adamsamec/component-selector' of https://github.com/ada…
24f49fe
Removed questions annotation from json files, generate numbering base…
hanys7 11ba4fe
trying to fix radio state logic do not work still
mituron 73cf139
trying to fix radio state logic do not work still
mituron b38fe68
clean up
mituron 053589d
Added image for UI types, fixed UI for input selections, used selecta…
hanys7 b71a37c
trying to fix displaying components after selection
mituron 6f51a67
changes to add component into array
mituron f4ef707
fix questions radio
mituron 674d327
remove unused code, add questions heading
mituron 6f2152c
Change folder structure
e634d5d
Add categories json
7a01e57
change import all JSONs in one
mituron 6c45608
Add selection from categories logic
e80cdf8
fix for pushing into field
mituron 782acc4
Add components filter feature
e49a82e
Small refactoring
057125d
Fix typ errors
842f180
Fix type error
75313c6
Small refactoring
2180e1b
Rename vars and functions
175d803
Extract MatchingComponents into React component in separate file
dcb276a
Small refactoring
7c34446
amend suitable components logic
mituron 969e71f
Extract BehaviorSelection component and refactor
aa544c2
Move behaviorOptions to JSON file
f71298e
Refactor mainly keys in Reacgt mappings
937e7a5
Refactor and fix keys
93054a9
Add aria-labelledby for radio groups
e0eb96c
Rename variables
4da4f21
fix checkbox name
mituron 2be1aed
Apply filter also to story names
f198a12
Add number of components available
d7f7b8b
Add number of matching components to heading
fb1e1be
Improve alt text for component card images
40190b4
Load component images from file based on component name rather than J…
9d12fdb
Small refactor for fully matching
7f9e0e8
Fix component name and story in matching components list
ca4f55d
Remove some unused imports
9f37ab2
Separate functionality into two modes
3414556
Fix lint errors and refactor
598dfef
Refactor function into useEffect
ca0f5fb
adding images from Kay
mituron d5bd244
import rest of missing component picture, preview
mituron 6f088f2
Fix TabList.png file name
15b703c
Reset form when mode changes
aa2d92c
Fix some filtering bugs
462f2ac
Fix component selection but still bugs with component removal
f1c2b80
Fix updating matching components after deselecting components
4dab3e3
sending as welll state selected
mituron 71ebb03
Fix Tag display
d5020c6
Fix cards selected state display and small refactoring
01b2f81
Selected components tags now work and added remove all components button
ae4bedc
Add link to skip to questions section
7649060
Focus first accordion button on last tag removal
73b1871
Refactor matching components into useMemo
9443182
removing tablist png
mituron 864f714
adding tabList png
mituron 021f0d9
Matching components heading and message changes
6b1adc1
adjust UI
mituron cec6116
Merge branch 'adamsamec/component-selector' of https://github.com/ada…
mituron 9bb6e0d
adding rest of components
mituron ae01ee1
UI changes, moved search to right corner, clean up UI
mituron af2db5f
adding rest of components JSON
mituron 05a5717
Categorize all components
346ce60
Add visually hidden components count live region
d478e67
update questions, groups
mituron 64baf69
Remove tabs for selection by components or behaviors
cf1cb47
Change categories into groups
a1d0d66
Remove accordion used for groups and leave only headings
ccb6a02
Remove group headings if group has no components after filtering
78b53bf
fix for data grid json
mituron 01f59c9
Added filtering by group name | Fixed layout for filter input field |…
hanys7 5494e37
Added Fill out checklist to scroll to questions
hanys7 0ab7795
Add script to automatically generate index export files from componen…
hanys7 b4fa574
revert generate cs command due to conflict
hanys7 88529dd
Added generate:cs to main package json
hanys7 e0dc1c1
reverted root css changes
hanys7 7cd4afc
add attributeMapping json, changes in question, index
mituron 089fa1e
Merge branch 'adamsamec/component-selector' of https://github.com/ada…
mituron d5ce5b4
uploading JSONS to fix build
mituron e1d87dd
update questions and attributeMappings questions
mituron 07f998f
Added jump to section functionality, styling, some other UI fixes
hanys7 f8b6102
fixed overflow
hanys7 88af771
added more space
hanys7 f06e398
Adapt code to new component attributes mapping
f87af18
Merge branch 'adamsamec/component-selector' of https://github.com/ada…
1e725f5
update about attributes mapping, update in styling
mituron d203b70
Don't display components which have no questions
6f4db8a
fix wrong json, remove not relevant questions
mituron 49742f5
Fix displayed component count
be4771f
moving results next to questions
mituron ad01f83
get results sticky when scrolling
mituron 584149b
Refactor definitions to be provided as props
c94efba
Accept refactored code
b449f20
merging, adding results UI changes after refactoring
mituron a1fbe70
adding custom component infoIcon
mituron 7e1eca7
imporving questions mapping
mituron 396490a
removing toolbar, let there only search
mituron 6363874
Use component link property if present in JSON
c8e17c9
Replace base components with the inheriting components
b3f2fa1
Fix single and multiple choice components list
134cde8
Clean attributes mapping a bit
2cf1ede
removing attributes and extends props from JSONs
mituron 3b0c5c6
Remove Base components
17c9173
Remove unused code, console logs and other refactor
615f82f
Small refactor using logical operator
d05c2b9
Merge branch 'master' into adamsamec/component-selector
f9a300c
Migrate Component Selector to the new storybook
8aab8e1
Change search field label and placeholder
97d760d
Fix lint errors
feda96b
Fix other lint errors
bea650b
Replace occurances of any with proper types
181816c
Further small refactoring
8648de6
Focus questions when scrolling and var names refactor
e6526b7
Extract styles to separate files from component files
c50ab74
Fix component categorization and selection logic and clean JSONs
df009df
Merge remote-tracking branch 'adam/adamsamec/component-selector' into…
jurokapsiar 815f175
chore(Component selector): Move code to the package
jurokapsiar 1381cee
remove unintentional changes
jurokapsiar 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
164 changes: 164 additions & 0 deletions
164
packages/react-components/component-selector-preview/library/src/ComponentSelector.styles.ts
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,164 @@ | ||
import { makeStyles, tokens } from '@fluentui/react-components'; | ||
|
||
export const useStyles = makeStyles({ | ||
visuallyHidden: { | ||
clip: 'rect(0px, 0px, 0px, 0px)', | ||
height: '1px', | ||
width: '1px', | ||
margin: '-1px', | ||
padding: '0px', | ||
overflow: 'hidden', | ||
position: 'absolute', | ||
}, | ||
secondLevel: { 'margin-left': '30px' }, | ||
thirdLevel: { 'margin-left': '60px' }, | ||
forthLevel: { 'margin-left': '90px' }, | ||
heading: { margin: '30px 0 10px 0' }, | ||
root: { | ||
// Stack the label above the field with a gap | ||
display: 'flex', | ||
flexWrap: 'wrap', | ||
gap: '2px', | ||
maxWidth: '1600px', | ||
}, | ||
tagsList: { | ||
listStyleType: 'none', | ||
marginBottom: tokens.spacingVerticalXXS, | ||
marginTop: 0, | ||
paddingLeft: 0, | ||
display: 'flex', | ||
gridGap: tokens.spacingHorizontalXXS, | ||
}, | ||
tooltip: { maxWidth: '500px important!', backgroundColor: 'red' }, | ||
componentWrapper: { | ||
display: 'flex', | ||
flexDirection: 'column', | ||
flex: 1, | ||
overflow: 'hidden', | ||
}, | ||
bodyWrapper: { | ||
display: 'flex', | ||
flexDirection: 'column', | ||
flex: 1, | ||
padding: '20px', | ||
overflowY: 'auto', | ||
maxHeight: 'calc(100vh - 490px)', | ||
}, | ||
footerWrapper: { | ||
display: 'flex', | ||
justifyContent: 'space-between', | ||
position: 'sticky', | ||
bottom: '0', | ||
width: '100%', | ||
padding: '30px 0 0 0', | ||
overflowX: 'auto', | ||
}, | ||
headerWrapper: { | ||
display: 'flex', | ||
flexDirection: 'column', | ||
}, | ||
questionsWrapper: { | ||
padding: '20px', | ||
margin: '20px 0', | ||
backgroundColor: 'white', | ||
borderRadius: '16px', | ||
border: '1px solid var(--colorNeutralStroke1, #e1dfdd)', | ||
boxShadow: '0 0 10px rgba(0, 0, 0, 0.1)', | ||
}, | ||
questionsLabel: { | ||
color: '#ff00ff', | ||
fontWeight: tokens.fontWeightBold, | ||
marginRight: '8px', | ||
}, | ||
questionsText: { | ||
fontWeight: tokens.fontWeightBold, | ||
fontSize: tokens.fontSizeBase400, | ||
}, | ||
questionContainer: { | ||
display: 'flex', | ||
}, | ||
questionRightSide: { | ||
borderLeft: '1px solid #ff00ff', | ||
padding: '0 10px', | ||
}, | ||
radioItem: { | ||
display: 'flex', | ||
}, | ||
selectedItemTag: { | ||
color: 'white', | ||
backgroundColor: '#5b5fc7', | ||
}, | ||
selectedItemsContainer: { | ||
marginLeft: '10px', | ||
}, | ||
selectedComponentTitle: { | ||
marginBottom: '10px', | ||
}, | ||
actionsHeaderWrapper: { | ||
display: 'flex', | ||
margin: '15px 0', | ||
}, | ||
searchComponentInput: { | ||
alignSelf: 'flex-start', | ||
width: '300px', | ||
marginLeft: '20px', | ||
}, | ||
jumpToCategoryHeader: { | ||
alignSelf: 'flex-start', | ||
paddingLeft: '10px', | ||
fontSize: 'medium', | ||
}, | ||
jumpToCategoryButtons: { | ||
display: 'flex', | ||
flexDirection: 'row', | ||
marginBottom: '20px', | ||
}, | ||
jumpToCategoryTags: { | ||
overflowX: 'hidden', | ||
width: '800px', | ||
}, | ||
jumpToCategoryTag: { | ||
cursor: 'pointer', | ||
color: 'white', | ||
backgroundColor: '#5b5fc7', | ||
}, | ||
actionsHeader: { | ||
margin: 0, | ||
}, | ||
actionsHeaderIcon: { | ||
marginLeft: '5px', | ||
}, | ||
clearSelection: { | ||
flexShrink: 0, | ||
marginLeft: '10px', | ||
}, | ||
moreButton: { | ||
color: 'white', | ||
backgroundColor: '#5b5fc7', | ||
maxHeight: '32px', | ||
margin: '0 10px', | ||
fontWeight: '400', | ||
}, | ||
fillOutSection: { | ||
display: 'flex', | ||
justifyContent: 'end', | ||
}, | ||
headerHeadingAndInput: { | ||
display: 'flex', | ||
justifyContent: 'space-between', | ||
}, | ||
QuestionsAndResults: { | ||
display: 'flex', | ||
}, | ||
allQuestions: { | ||
width: '50%', | ||
}, | ||
resultsWrapper: { | ||
width: '50%', | ||
paddingLeft: '50px', | ||
}, | ||
results: { | ||
position: 'sticky', | ||
top: '5%', | ||
}, | ||
}); |
Oops, something went wrong.
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.
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.
🕵🏾♀️ visual changes to review in the Visual Change Report
vr-tests-react-components/Drawer 1 screenshots
vr-tests-react-components/Positioning 2 screenshots
vr-tests/Callout 10 screenshots
vr-tests/react-charting-GaugeChart 1 screenshots
vr-tests/react-charting-LineChart 2 screenshots
vr-tests/react-charting-VerticalBarChart 1 screenshots