feat: Neo Session Launcher Tour Guide via 'antd tour'
This PR Resolves #2260 Issue.
Feature:
- Provide Tour Guide for
Neo Session Launcher. - Controls the current step as a state, resetting it to the initial step when the sectional step changes.
- To access elements in a child component, used forwardRef. If passing multiple refs is needed, used a querySelector to directly traverse the elements.
- The antd built-in scroll event didn't work well, so I created a function to control the scroll event.
Checklist: (if applicable)
- [ ] Mention to the original issue
- [ ] Documentation
- [ ] Minium required manager version
- [ ] Specific setting for review (eg., KB link, endpoint or how to setup)
- [ ] Minimum requirements to check during review
- [ ] Test case(s) to demonstrate the difference of before/after
Coverage report for ./react
St.:grey_question: |
Category | Percentage | Covered / Total |
|---|---|---|---|
| π΄ | Statements | 2.68% (-0.01% π») |
118/4396 |
| π΄ | Branches | 2.89% (-0.01% π») |
87/3006 |
| π΄ | Functions | 1.31% (-0.01% π») |
19/1445 |
| π΄ | Lines | 2.64% (-0.01% π») |
114/4314 |
Show new covered files π£
St.:grey_question: |
File | Statements | Branches | Functions | Lines |
|---|---|---|---|---|---|
| π΄ | ... / SessionLauncherErrorTourProps.tsx |
0% | 0% | 0% | 0% |
Test suite run success
32 tests passing in 4 suites.
Report generated by π§ͺjest coverage report action from e3d48daa3c5c6e847c3534e58b99801d9af69103
It's better to show the start step in the center using target={null} https://ant.design/components/tour#tour-demo-placement
Please resolve the conflicts @ironAiken2
This stack of pull requests is managed by Graphite. Learn more about stacking.
Join @ironAiken2 and the rest of your teammates on
Graphite
Applied
There are too many steps in the tour. Let's keep only a few key steps and remove the rest. Let's split it into two tours:
- Tour 1: In the first step, welcome to Neo Session Launcher, move to the right step, move to the bottom button.
- Tour 2: Only display if there is a validation error in the final step.
- If there is a validation error, guide to press the modify button to correct it.
And let's refactoring
- use
data-test-idinstead of using class names or refs.- After remaining only 2 tours, unnecessary refs can be deleted.
- Instead of directly accessing localStorage in settings, use useBAISettingUserState.
- Give a more specific name to the setting, indicating that it is for determining whether the tour has been completed. For example, (has_toured_neo_session_launcher_introduction):