[Workspace]Refactor use case selector in workspace creation page#8413
Conversation
Signed-off-by: Lin Wang <wonglam@amazon.com>
Signed-off-by: Lin Wang <wonglam@amazon.com>
Signed-off-by: Lin Wang <wonglam@amazon.com>
Signed-off-by: Lin Wang <wonglam@amazon.com>
Signed-off-by: Lin Wang <wonglam@amazon.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8413 +/- ##
==========================================
+ Coverage 60.93% 60.94% +0.01%
==========================================
Files 3757 3758 +1
Lines 89263 89285 +22
Branches 13960 13968 +8
==========================================
+ Hits 54396 54419 +23
+ Misses 31479 31478 -1
Partials 3388 3388
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
| | ||
| <EuiLink onClick={handleLearnMoreClick}> | ||
| {i18n.translate('workspace.form.panels.useCase.learnMore', { | ||
| defaultMessage: 'Learn more.', |
There was a problem hiding this comment.
| defaultMessage: 'Learn more.', | |
| defaultMessage: 'Learn more', |
| {features && features.length > 0 && ( | ||
| <> | ||
| {i18n.translate('workspace.forms.useCaseFlyout.featuresIncluded', { | ||
| defaultMessage: 'Features included:', |
There was a problem hiding this comment.
| defaultMessage: 'Features included:', | |
| defaultMessage: 'Features included', |
| i18n.translate( | ||
| 'workspace.forms.useCaseFlyout.featuresDetails.delimiter', | ||
| { | ||
| defaultMessage: ', ', |
There was a problem hiding this comment.
Just curious, do we need i18n for this?
There was a problem hiding this comment.
I think this delimiter should have an i18n version, for example the comma in English and Chinese is a different symbol and will have different spacing. I think it would be a better idea using i18n.
| id: ALL_USE_CASE_ID, | ||
| title: i18n.translate('core.ui.group.all.title', { | ||
| defaultMessage: 'Analytics (All)', | ||
| defaultMessage: 'Analytics (all features)', |
Signed-off-by: Lin Wang <wonglam@amazon.com>
Signed-off-by: Lin Wang <wonglam@amazon.com>
Signed-off-by: Lin Wang <wonglam@amazon.com>
|
@Hailong-am I've removed the |
| formErrors, | ||
| availableUseCases, | ||
| }: WorkspaceUseCaseProps) => { | ||
| const [isFlyoutVisible, setIsFlyoutVisible] = useState(false); |
There was a problem hiding this comment.
nit: could named as isUseCaseFlyoutVisible
| }: WorkspaceUseCaseFlyoutProps) => { | ||
| return ( | ||
| <EuiFlyout | ||
| style={{ maxWidth: 431 }} |
There was a problem hiding this comment.
where does the 431 comes from?
There was a problem hiding this comment.
It's from the UX design.
| if (featureId.endsWith('overview')) { | ||
| continue; | ||
| } |
There was a problem hiding this comment.
maybe remove get started as well?
Signed-off-by: Lin Wang <wonglam@amazon.com>
Signed-off-by: Lin Wang <wonglam@amazon.com>
* Refactor use case selector in workspace create Signed-off-by: Lin Wang <wonglam@amazon.com> * Add gap for details panel title Signed-off-by: Lin Wang <wonglam@amazon.com> * Update use case name and description Signed-off-by: Lin Wang <wonglam@amazon.com> * Filter out hidden nav links Signed-off-by: Lin Wang <wonglam@amazon.com> * Changeset file for PR #8413 created/updated * Add test case for different feature details Signed-off-by: Lin Wang <wonglam@amazon.com> * Change back to "Analytics" Signed-off-by: Lin Wang <wonglam@amazon.com> * Add all features suffix for all use case Signed-off-by: Lin Wang <wonglam@amazon.com> * Fix failed unit tests Signed-off-by: Lin Wang <wonglam@amazon.com> * Filter out getting started links Signed-off-by: Lin Wang <wonglam@amazon.com> * Renaming isFlyoutVisible to isUseCaseFlyoutVisible Signed-off-by: Lin Wang <wonglam@amazon.com> --------- Signed-off-by: Lin Wang <wonglam@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> (cherry picked from commit 7b5a379) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…) (#8444) * Refactor use case selector in workspace create * Add gap for details panel title * Update use case name and description * Filter out hidden nav links * Changeset file for PR #8413 created/updated * Add test case for different feature details * Change back to "Analytics" * Add all features suffix for all use case * Fix failed unit tests * Filter out getting started links * Renaming isFlyoutVisible to isUseCaseFlyoutVisible --------- (cherry picked from commit 7b5a379) Signed-off-by: Lin Wang <wonglam@amazon.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
…nsearch-project#8413) (opensearch-project#8444) * Refactor use case selector in workspace create * Add gap for details panel title * Update use case name and description * Filter out hidden nav links * Changeset file for PR opensearch-project#8413 created/updated * Add test case for different feature details * Change back to "Analytics" * Add all features suffix for all use case * Fix failed unit tests * Filter out getting started links * Renaming isFlyoutVisible to isUseCaseFlyoutVisible --------- (cherry picked from commit 7b5a379) Signed-off-by: Lin Wang <wonglam@amazon.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>





Description
This PR is for refactoring the use case selector in the workspace creation page. It mainly refactors the features displayed in the use case card. The feature descriptions are moved to a separate use case flyout, which will be displayed after clicking the 'Learn more' button.
Screenshot
Testing the changes
yarn osd bootstrap --single-version looseconfig/opensearch_dashboards.ymlyarn start --no-base-pathChangelog
Check List
yarn test:jestyarn test:jest_integration