-
Notifications
You must be signed in to change notification settings - Fork 232
Incorrect view only channel #4733
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
Incorrect view only channel #4733
Conversation
| }, | ||
| reloadChannel(id) { | ||
| if (!id) { | ||
| this.$store.dispatch('currentChannel/loadChannel').catch(error => { |
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.
Maybe using mapActions('currentChannel', [ 'loadChannel' ]), and calling this.loadChannel() here might be a better way? A promise would still be returned so we should be good with the catch. I am only conflicted on throwing the error(next line) in this scenario, probably displaying a snackbar would be subtler(for example in situations when the server is disconnected)? @marcellamaki any thoughts?
| rootId: { | ||
| handler: 'reloadChannel', | ||
| immediate: true, | ||
| }, |
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.
Maybe the below would be useful for maintainability?
rootId: {
handler(id) {
.....
},
immediate: true
}
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.
Code changes look correct to me. Manual QA also checks out. Thanks @LianaHarris360
|
Thanks @LianaHarris360 - I confirm that this is implemented as specified above, no issues observed while manually testing. |
Summary
Description of the change(s) you made
This pull request resolves the issue where a channel containing imported resources transitions to the 'Unpublished View-only' display after opening a new tab and selecting a different channel.
This pull request also fixes the console error
Invalid prop: type check failed for prop "nodeId". Expected String, got Undefinedwhich occurred whenrootId/nodeIdwas undefined withinStudioTree.vue.TreeViewBase.vuewithrootIdwatcher that triggers an API call if rootId is undefined, allowing the accurate view status of the channel to stay displayed.v-elseto v-else-if=“rootId”to avoid renderingStudioTreewhenrootIdis undefined, preventing the invalid prop error from appearing.Manual verification steps performed
Screenshots (if applicable)
TwoTabChannels.mov
Reviewer guidance
How can a reviewer test these changes?
References
Fixes #4647
Contributor's Checklist
PR process:
CHANGELOGlabel been added to this PR. Note: items with this label will be added to the CHANGELOG at a later timedocslabel has been added if this introduces a change that needs to be updated in the user docs?requirements.txtfiles also included in this PRStudio-specifc:
notranslateclass been added to elements that shouldn't be translated by Google Chrome's automatic translation feature (e.g. icons, user-generated text)pages,components, andlayoutsdirectories as described in the docsTesting:
Reviewer's Checklist
This section is for reviewers to fill out.
yarnandpip)