-
Notifications
You must be signed in to change notification settings - Fork 178
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
Dashboard: Google Analytics id updates via settings view #3777
Conversation
Size Change: +593 B (0%) Total Size: 1.17 MB
ℹ️ View Unchanged
|
({ newGoogleAnalyticsId }) => { | ||
const updatedSettings = { | ||
googleAnalyticsId: | ||
typeof newGoogleAnalyticsId === 'string' && newGoogleAnalyticsId, | ||
}; |
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.
Am checking for a string here to know that it's the analytics ID that is getting updated so that the same handler can be used for publisher logos.
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.
Would a publisher logo be a blob at this point or a string of a path?
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.
it's a blob
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.
and it'll come in as it's own key in the prop object called 'publisherLogo'. Here i'm really checking to see if the update to the ga id is either a) a new id or b) removing an existing id or c) nothing to do with the ga id at all (which would mean it's false)
Codecov Report
@@ Coverage Diff @@
## main #3777 +/- ##
==========================================
+ Coverage 73.81% 83.24% +9.42%
==========================================
Files 34 787 +753
Lines 2108 13695 +11587
==========================================
+ Hits 1556 11400 +9844
- Misses 552 2295 +1743
Flags with carried forward coverage won't be shown. Click here to find out more.
|
69e6ff0
to
793ae03
Compare
Note that we cannot use markup in translated texts yet, see #1578 So if you add this link, I suggest doing something like this: TEXT.CONTEXT = __('[...] read this article:', 'web-stories' ); // note the colon
<TextInputHelperText>{TEXT.CONTEXT}</TextInputHelperText>
<TextInputHelperText><a href="https://blog.amp.dev/2019/08/28/analytics-for-your-amp-stories/">{__('Analytics for your Web Stories')}</TextInputHelperText>
I don't think there's UX for this yet. Sounds like something for a follow-up issue? Passing the information from PHP would be trivial though.
You can check |
@swissspidy this sounds great! I am checking for |
(converting to draft to make changes suggested by Pascal). Will update for review. |
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.
This looks good
assets/src/dashboard/app/views/editorSettings/googleAnalytics/index.js
Outdated
Show resolved
Hide resolved
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.
lgtm
@swissspidy When you get a chance - do you have any other change requests here or is it ok to move to ready for QA? |
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.
LGTM 👍
When I tested this, it didn't work. I didn't see an update button or any way to save or any request to go to the server. I am missing something? |
You have to hit 'enter' - it's the same input style as the 'rename' of a story. I reused the input since we have new designs incoming. I agree there should be some sort of button but since this is feature flagged we can circle back. Try hitting enter and see if it works. |
Accessibility is key here, and should be noted as such on the ticket. |
I'll make a new ticket for this and flag it as UX needed so that it doesn't get lost in the shuffle. |
This is a form that submits something, it needs a button for save for accessibility reasons. I didn't think to press enter at all. |
@spacedmonkey I 100% agree and when testing this out I was confused too. But I think this is something that is a product decision and so far auto-submit or Enter to submit has been the choice. Definitely something we should flag because so far 3 engineers testing this have all been initially stumped. Since this is still just in storybook and also behind a flag I think we can merge this in and iterate when we come to a consensus. I'm nervous about letting branches stagnate over product decisions, not technical ones. |
…s view to app with route
…ff to API, update input to show error structure
…ut needs testing before being allowed to be used. prepping settings page to be usable by clearing out the stubbed publisher logo component (that will follow as a separate PR under the same flag). Adjusting the secondary app routes to conditionally allow editor settings to be visible. Have to check flag at app level too to allow SettingsView to be available.
… for enabled settings view flag. When both canManageSettins and that flag are true then the settings page is allowed to render. Doing same check in sideNav in app nav links to show or hide the settings page link.
…ly added it to take care of canmanageSettings
b7fcade
to
ba7794f
Compare
Summary
New flag to enableSettingsView that, when enabled, allows a user to update their Google Analytics Id if they have editing capabilities.
Relevant Technical Choices
enableSettingsView
to control settings view visibility.inProgress
flaggingTo Do (Amended)
These should be follow up tickets/prs
User-facing changes
Testing Instructions
includes/Experiments.php
enableSettingsView
to'default' => true
(line 242).Addresses #3482