bcgov / bcgov/foi-flow

Document Reviewer - 'Download', 'Print', and 'Save' Updates

Open
#4,128 3 comments 0 reactions 0 assignees View on GitHub
Story
Dominant language
Python
Stars
8
Forks
2
Avg merge
14h 34m
Merged PRs (30d)
46

Description

* As a user of the Document Reviewer
* I want to save a copy of the package based on my current filter criteria
* so that I can export a copy of the filtered package

**Assumptions & Scope**
What are the assumptions for this story?

The Document Reviewer currently has a feature that allows users to 'Download', 'Print' or 'Save' their current selected file, with options to include comments and annotations, and selecting page ranges.

![image](https://github.com/bcgov/foi-flow/assets/117312323/0624aa35-aa8c-49c5-bd30-1b0ace4f3274)

We do not require 'Download' and 'Print', and these can be removed. We only require the 'Save As' option, with some alterations.

Currently, the 'Save As' feature only works on a file-by-file basis. That is, you can only save a copy of the file you currently have open/expanded in the navigation (left) pane.

To make this feature more helpful, the 'Save As' feature, and the resulting file that is produced by using this feature, should be responsive to the filter criteria that has been selected in the navigation (left) pane, and only include the current files and pages that result from the filter.

![image](https://github.com/bcgov/foi-flow/assets/117312323/a49fb542-7abd-4430-9894-89f4e31190a1)

For example, if you select to filter down the package by the 'Consult' page flag, and then select to 'Save As', the resulting file produced should only include pages that have the consult flag in the entire package.

![image](https://github.com/bcgov/foi-flow/assets/117312323/66e1e8aa-65dd-4b95-bede-b61fe08a64b0)

Afterwards, the file to be produced can be further narrowed down by choosing a 'Page Range' option. (E.g., you can filter down the package by the 'Consult' page flag, then in the 'Save As' option you select a page range from those with the 'Consult' page flag to include in the produced file).

![image](https://github.com/bcgov/foi-flow/assets/117312323/3f7e8865-d991-477d-8442-673dc00d4f99)

When client side document stitching is complete, this may become more feasible, being able to save based on the full package of files and pages, rather than just on the specific file you have open/expanded.

This will allow us to provide users flexibility in how they can produce a package, to address niche or edge cases, along with features that are yet to be developed. This will allow users to still perform their job through the Document Reviewer while features are yet to be developed / released (e.g., for consult packages and OIPC reviews). Open Information will have a separate process in the mean time.

What is IN scope?
Remove 'Print' and 'Download' options
Save/download a file based on the filter criteria and page ranges selected
Add 'Apply s.14 Redactions' option
Update 'Include Annotations' option
Formatting in the produced file

What is NOT in scope?
Document Stitching
Save and Download Redline
Save and Download Response Package
Create, save and download consult for public body

**Acceptance Criteria**

**Scenario 1: Hamburger Menu Options**
* GIVEN a user is logged in to the document reviewer on a request
* WHEN the user clicks on the hamburger menu option
* THEN the options of 'Save As' and 'Settings' will be available
* AND the options of 'Download' and 'Print' are no longer displayed

**Scenario 2: Save As Option**
* GIVEN a user is logged in to the document reviewer on a request
* AND has the hamburger menu open
* WHEN the user clicks 'Save As'
* THEN the 'Save As' menu will be displayed

**Scenario 3: Save As - Menu Options**
* GIVEN a user has clicked 'Save As'
* AND the 'Save As' menu has opened
* THEN the menu will be displayed with the sections of 'General', 'Page Range', and 'Properties'.
* AND the 'General' section will have the options to edit the file name and file type
* AND the 'Page Range' section has the option to select all pages, current page, or specify pages
* AND the 'Properties' section has the options to 'Include Annotations', Include Comments', and 'Apply s.14 Redactions'

**Scenario 4: 'Save File' - General Functionality**
* GIVEN a user is in the 'Save As' menu
* WHEN the user clicks 'Save File'
* THEN the saved file will be downloaded in the browser
* AND the file will be downloaded in the chosen file format / file name
* AND the file will only include the filtered pages/files (as selected in the left pane)
* AND further narrowed down based on the 'Page Range' option selected
* AND, if selected, will include annotations, comments, and applied s.14 redactions

**Scenario 5: Save As - 'Include Annotations'**
* GIVEN a user is in the 'Save As' menu
* AND the user checks the existing 'Include Annotations' checkbox
* WHEN the user selects 'Save File'
* THEN the saved file will be downloaded in the browser
* AND the saved file will show all annotations (which includes redactions)
* AND redactions will have a translucent fill (as per #3652) and red boarder
* AND the FOIPPA section number will be displayed in red in the top-left of the redaction box
* AND other annotations will be displayed according to their existing formatting (e.g., fill or highlight colour, opacity, etc.)

**Scenario 6: Save As - Select 'Apply s.14 Redactions'**
* GIVEN a user is in the 'Save As' menu
* WHEN the user checks the new 'Apply s.14 Redactions' checkbox
* THEN the checkbox will be filled with a checkmark and is selected

**Scenario 7: Save As - Unselect 'Apply s.14 Redactions'**
* GIVEN a user is in the 'Save As' menu
* WHEN the unchecks the new 'Apply s.14 Redactions' checkbox
* THEN the checkmark will be removed and this option is unselected

**Scenario 8: 'Apply s.14 Redactions' Saved File**
* GIVEN a user is in the 'Save As' menu and has checked the 'Apply s.14 Redactions' checkbox
* WHEN the user clicks 'Save File'
* THEN the saved file will be downloaded in the browser
* AND the file will have all redaction boxes that are marked with 's.14' filled with solid white fill
* AND the FOIPPA section number will be displayed in red in the top-left of the redaction box

**Scenario 9: 'Apply s.14 Redactions' and 'Include Annotations' Both Selected**
* GIVEN a user is in the 'Save As' menu and has checked both the 'Apply s.14 Redactions' and 'Include Annotations' checkbox
* WHEN the user clicks 'Save File'
* THEN the saved file will be downloaded in the browser
* AND the file will have all redaction boxes that are marked with 's.14' filled with solid white fill and a red border
* AND the FOIPPA section number will be displayed in red in the top-left of the redaction box
* AND all other redactions will be filled with translucent fill (as per #3652) and a red border

**Dependencies? What is the impact of this dependency? (If so, link dependency in the ticket, make it visible in a team´s backlog)**

#4075
#3907
#3652
#4125

**Validation Rules? (If yes, list here)**

**Design**
@xxx - please link the Design here

**Definition of Ready**

1. [ ] Is there a well articulated User Story?
2. [ ] Is there Acceptance Criteria that covers all scenarios (happy/sad paths)?
3. [ ] If there is a user interface, is there a design?
4. [ ] Does the user story need user research/validation?
5. [ ] Does this User Story needs stakeholder approval?
6. [ ] Design / Solution accepted by Product Owner
7. [ ] Is this user story small enough to be completed in a Sprint? Should it be split?
8. [ ] Are the dependencies known/ understood? (technical, business, regulatory/policy)
9. [ ] Has the story been estimated?

**Definition of Done**

1. [ ] Passes developer unit tests
2. [ ] Passes peer code review
3. [ ] If there's a user interface, passes UX assurance
4. [ ] Passes QA of Acceptance Criteria with verification in Dev and Test
5. [ ] Confirm Test cases built and succeeding
6. [ ] No regression test failures
7. [ ] Test coverage acceptable by Product Owner
8. [ ] Ticket ready to be merged to master or story branch
9. [ ] Developer to list Config changes/ Update documents and designs
10. [ ] Can be demoed in Sprint Review
11. [ ] Tagged as part of a Release
12. [ ] Feature flagged if required
13. [ ] Change Management activities done?

Contributor guide

Open the contributing guide

Research direction

Start at the Document Reviewer hamburger menu and trace the existing Save As flow. Use the acceptance scenarios to define the menu, filtering, page-range, annotation, comment, and s.14 redaction behavior, including removal of Download and Print. Done means the saved browser download matches the selected criteria and all listed scenarios pass; review dependencies #4075, #3907, #3652, and #4125 first.

Written by the indexing model from the issue text.

Assessment

Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.