-
Notifications
You must be signed in to change notification settings - Fork 31
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
Onboarding & Network Tour #76
base: master
Are you sure you want to change the base?
Conversation
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.
Just some questions I would like to solve 😶🌫️
df7272d
to
d0ee499
Compare
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.
Generally nice! 👍
I was a bit confused when reading through Tour.vue, but I think that is partly because of the functions and variables not being named optimally, so I think there's some potential to improve.
My advice is also in regards to this being "mobile-only". Don't push desktop size too far back, it might get hard to find where to split functionality if done too late.
492d602
to
872c9a4
Compare
b5b88d3
to
0ea31ac
Compare
26c2fbd
to
4b17f53
Compare
- Added new Welcome Modal - Added TourComponent - Added new composable useTour - Updated some DOM/translations in other components
- Renamed some vars - Refactored some code - Reestructured lifecycle and steps
This PR is mostly done. Although there are still some tasks that need to be finished:
|
- it will go automatically to next step
Just realised a possible problem:
A possible solution could be to skip steps 2 (internally called Jumping from step 2 to 4 may be a bit out of place and not giving any feedback to the user may be strange, but perhaps not so much of a problem as the number of times this happens is low. |
- Save tour index, so if user reloads page, can keep going from the last step - Fixed UI and UX errors
- handle erros when faucet returns error
You can see 35e8301 |
d02c66f
to
558bdf3
Compare
b1c3ad0
to
40c00f4
Compare
Onboarding tour is only meant for users who don't have a ledger. Therefore, in /welcome, the modal should be different if the user has a ledger. |
Wallet Tours
This PR brings tours to the wallet.
For now, onboarding and network tour has been made, but the logic of the tour has been made in a way that it is easy to add new tour, even copy and paste it in other vue projects.
See it in action in PC
❗This PR simplifies
useWindowSize
logic and 4 other composables have been added which I believe are usefulThings that need to be done
WelcomeModal
design (currently blocked by overnice)Features
App.vue
) 🏜️Known limitations
This are some problems and limitations that I believe are not worth solving because they are time consuming and/or only happens in very specific scenarios.
wallet.nimiq-testnet
. This shouldn't happen anymore, but it has not been testedpointer-events: none
translation extraction script
have some issues if we try to translate strings from.ts
files, a workaround can be seen hereTechnical explication
Tour.vue
andTourLargeScreenManager.vue
. New welcome modal named:DiscoverTheWalletModal.vue
/lib/tour
: Here are thetypes
for the Tour and steps for each tour have been defined. A tour basically is composed by a series of steps. For now, only two tours have been developed:onboarding
andnetwork
. Each step has:tooltip
: This is the configuration for the tooltip. Basically, it is using the API from Vue Tour under the hood with the only change thatcontent
MUST be an array of stringsui
: Which has:fadedElements
: Elements that we need to addopacity
. This elements will not have interactivity. See "Disabling interactivity and adding opacity" section.disabledElements
: Elements that we need to remove interactivity. See "Disabling interactivity and adding opacity" section.isNextStepDisabled
lifecycle
: Custom functions that the developer can execute in different phases of the transition between steps. See "Steps lifecycle" sectionDisabling interactivity and adding opacity
We are using
data-attribute
instead ofCSS classes
because it is easier to track which elements should be updated asdata attributes
allow to use a selector like[data-opaified="1"]
and also selectors like[data-opacified]
. SeeTour.vue@_removeAttributes
Communication between
Tour.vue
andTourLargeScreenManager.vue
As these two component don't have any close relationship but the need to send data/actions to each other, they are using root instance to emit events. For example here
Getting data from other component
The idea is that the Tour function works as explicitly as possible, therefore, changing code of other original components have been avoided but sometimes the Tour logic needs a component's instance, so this function have been added:
searchComponentByName
Steps lifecycle
See
Tour.vue@_moveToFutureStep()
New dependencies
In the future we could use Vue 3 Tour
How it has been tested?