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 feature flag for dashboard segments filter #6695

Merged
merged 1 commit into from
Sep 23, 2024
Merged

Conversation

acelaya
Copy link
Contributor

@acelaya acelaya commented Sep 23, 2024

This PR adds a feature flag to control when to show the segments filter in the dashboard assignment view.

The feature flag will be taken into consideration only for non-staff users. For staff users, the BE will always expose this option as enabled.

Additionally, for auto-grading assignments, the FE does not take this option into consideration, and instead, it always shows the filter, as it is important in that case, and the first use case for which we introduced the segments filter.

image

Testing steps

  1. Check out this branch
  2. For staff:
    1. Go to the courses section in the LMS admin http://localhost:8001/admin/courses
    2. Click search, open any course from the result, and click on "Open instructor dashboard"
    3. Once there, if you select any assignment, you should see the segments filter, with a total of 4 dropdowns.
  3. For auto-grading assignments:
    1. Go to https://hypothesis.instructure.com/courses/319/assignments/7296
    2. Click on the user icon in the sidebar, then in "Open dashboard".
    3. You should see the segments filter, with a total of 4 dropdowns.
  4. For assignments where the feature is explicitly enabled:
    1. Go to https://hypothesis.instructure.com/courses/125/assignments/873 and log in as eng+canvasteacher@hypothes.is
    2. Click on the user icon in the sidebar, then in "Open dashboard".
    3. You should only see three filter dropdowns.
    4. On a new tab, go to http://localhost:8001/admin/instances/8/settings, and check the "Enable segments filter in assignment view" option.
    5. Go back to the dashboard and reload the page. You should see the segments dropdown now, with a total of 4.

@acelaya acelaya marked this pull request as ready for review September 23, 2024 09:14
@@ -279,6 +279,15 @@ export type DashboardUser = {
export type DashboardConfig = {
routes: DashboardRoutes;
user: DashboardUser;

/** Whether syncing grades is enabled for auto-grading assignments or not */
auto_grading_sync_enabled: boolean;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is not part of this PR specifically, but I'm adding it to the type definition to reduce conflicts with other branches later.

Copy link
Member

@marcospri marcospri left a comment

Choose a reason for hiding this comment

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

Nice, nothing to add here 👍

@acelaya acelaya merged commit b2d14ff into main Sep 23, 2024
9 checks passed
@acelaya acelaya deleted the segments-filter-ff branch September 23, 2024 10: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.

2 participants