-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat: Hide page elements based on query param #3323
Conversation
Used a local resolver. My other idea was to use a cookie. Not sure if there is a benefit to using either approach. I tested this and LGTM, it also prevents any flash of the header and works even when not logged in after auth0 redirect |
@@ -113,7 +113,7 @@ export default { | |||
}, | |||
methods: { | |||
onOpen() { | |||
this.$refs.mega.onOpen(); | |||
this.$refs?.mega?.onOpen?.(); |
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.
added optional chaining on these as I was getting an error when the header was hidden.
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.
💯
return Promise.all([ | ||
client.query({ query: hasEverLoggedInQuery }), | ||
fetchAllExpSettings(config, client, { | ||
query: _get(args, 'route.query'), |
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.
_get refactor
* Hides global promo, nav menu and secondary menu if query param kivaAppReferral=true exists GD-139
src/components/WwwFrame/WwwPage.vue
Outdated
referralData = this.apollo.readQuery({ | ||
query: isKivaAppReferralQuery, | ||
variables: { | ||
kivaAppReferralQueryParam: this.$route?.query?.kivaAppReferral, |
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.
send this query param as the variable. It is a string. We do the casting from string to Boolean in the local resolver.
ee6a32d
to
fce519b
Compare
I think the local resolver option is good as it "should" persist for page transitions within the Ui app. I'm not really interested in setting something as persistent as a cookie for this task. |
@mcstover This will not persist for page transitions |
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.
nice 👍
👍 |
GD-139