Skip to content
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

Add configuration settings to disable help panel, share panel and account menu #6783

Merged
merged 3 commits into from
Jan 27, 2025

Conversation

robertknight
Copy link
Member

@robertknight robertknight commented Jan 27, 2025

Add configuration options for annotation services to hide additional controls:

  • enableHelpPanel allows hiding the Help panel. This also disables automatic display of the tutorial on first run and removes the Help link in the annotation toolbar.
  • enableShareImportExportPanel allows hiding the Share menu in the toolbar which contains the Share, Import and Export panels
  • enableAccountMenu allows hiding the user account menu

With all of these controls disabled, the client looks like this:

controls-disabled

Fixes #6782.

This can be tested with the exam-notes app using https://github.com/hypothesis/exam-notes/pull/23.

Copy link

codecov bot commented Jan 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.43%. Comparing base (898f908) to head (2c866df).
Report is 11 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6783   +/-   ##
=======================================
  Coverage   99.43%   99.43%           
=======================================
  Files         270      270           
  Lines       10243    10268   +25     
  Branches     2450     2467   +17     
=======================================
+ Hits        10185    10210   +25     
  Misses         58       58           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Enable third-party authority owners to hide:

 1. The Share / Import / Export panel
 2. The Help / Version panel
 3. The user account menu

The initial use case is the exam-notes app where the Import/Export panel is
hidden to address a concern around cheating and the Help/Version panel is hidden
to remove unwanted links to external websites (our KB) in this context. The
user account menu is hidden just to simplify the UI.

Part of #6782.
The purpose of disabling the Help panel is to remove links to external websites
which is necessary for the exam-notes app. Therefore we also need to remove the
formatting help link from the annotation toolbar.
When the `enableHelpPanel` service configuration is set to `false`, don't show
the tutorial/help panel to new users on first launch.
@robertknight robertknight force-pushed the hide-share-account-help-controls branch from dcb88a7 to 2c866df Compare January 27, 2025 11:58
@robertknight robertknight requested a review from acelaya January 27, 2025 13:19
enableAccountMenu?: boolean;

/** Enable or disable the Help / Version panel. */
enableHelpPanel?: boolean;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reckon we have some rst documentation that covers these options. Should we update it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do, I'll update that in a separate PR.

Copy link
Contributor

@acelaya acelaya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@robertknight robertknight merged commit 4434519 into main Jan 27, 2025
4 checks passed
@robertknight robertknight deleted the hide-share-account-help-controls branch January 27, 2025 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support hiding various controls in exam-notes app
2 participants