-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Guided onboarding] Dynamic URLs for steps #154572
[Guided onboarding] Dynamic URLs for steps #154572
Conversation
@elasticmachine merge upstream |
Pinging @elastic/platform-onboarding (Team:Journey/Onboarding) |
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.
Thanks for working on this @yuliacech! Changes LGTM. Verified locally. Left a couple minor comments in the code. Let me know if you end up making changes and want me to review again.
Also, noticed a small UI bug while testing (unrelated to your PR). Opened #155421 to follow up.
export interface GuideState { | ||
guideId: GuideId; | ||
status: GuideStatus; | ||
isActive?: boolean; // Drives the current guide shown in the dropdown panel | ||
steps: GuideStep[]; | ||
params?: GuideParams; |
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.
Should we rename this to something more specific? Or do we expect the potential to use this in other ways than just the URL in the future?
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.
yes, I thought that we might have other dynamic parameters like integrations or something in the copy. But I can also rename it to something more specific, for example urlParams
or even just guideConfigParams
or guideParams
, wdyt? (naming is hard 😅 )
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.
I'm OK to leave as-is for now. We can always revisit.
@@ -360,7 +361,8 @@ export class ApiService implements GuidedOnboardingApi { | |||
*/ | |||
public async completeGuideStep( | |||
guideId: GuideId, | |||
stepId: GuideStepIds | |||
stepId: GuideStepIds, | |||
params?: GuideParams |
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.
[nit] Probably outside the scope of this PR, but this might be easier to reason with if we passed in an single object with the arguments.
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.
The reasoning here was to not introduce any breaking changes for the existing guides that are not going to use dynamic params.
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.
👍 makes sense
…configuring dynamic urls easier
Thanks a lot for your review, @alisonelizabeth! |
Thanks @yuliacech! That makes sense to me. I reviewed the commit and changes LGTM. I did not retest. |
💚 Build Succeeded
Metrics [docs]Module Count
Public APIs missing comments
Page load bundle
Unknown metric groupsAPI count
ESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
Summary
Fixes #143322
This PR adds an option to store dynamic parameters when a step is completed to be used later for dynamically built URLs.
How to test
xpack.cloud.id: 'testID'
to your/config/kibana.dev.yml
fileyarn es snapshot
yarn start --run-examples
http://localhost:5601/app/guidedOnboardingExample
indexName
Checklist