GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Hide share button in TreeViewBase if user does not have permissions t… by taoerman · Pull Request #5550 · learningequality/studio Conversation
Contributor
…o see any option SummaryFixes issue by hiding the Share button in TreeViewBase when the user cannot use any share options. Added canShareChannel (returns true if canManage or isPublished) to control button visibility. Added CanSubmitToCommunityLibrary to control the "Submit to community library" menu item. The Share button now renders only when at least one option is available (invite collaborators, share token, or submit to community library), and each menu item is conditionally shown based on permissions. Added tests covering computed properties, button visibility, and menu item visibility across permission and channel state combinations. ReferencesFixed #5453 Reviewer guidanceRun unit tests or Test manually.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
AlexVelezLl
requested changes
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Everything looks good with the production code! Just one little comment to make tests a little bit easier to read, and to prevent ourselves from having to make a lot of updates on these tests when we update this component to KDS.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Comment on lines
+123
to
+182
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Although stubbing these components may make the tests run faster, I don't think we need to stub every child/descendant component. For example, I don't think we may need to stub presentational components like the
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks Alex, I've fixed the code.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
AlexVelezLl
approved these changes
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lgtm!
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
AllanOXDi
pushed a commit
to AllanOXDi/studio
that referenced
this pull request
learningequality#5550) * Hide share button in TreeViewBase if user does not have permissions to see any option * [pre-commit.ci lite] apply automatic fixes * fix linting * fix test file --------- Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
None yet
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Hide share button in TreeViewBase if user does not have permissions to see any optionUh oh!
There was an error while loading. Please reload this page. Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |