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

fix(workspaces): QA issues #6836

Merged
merged 8 commits into from
Oct 25, 2023
Merged

Conversation

foochifa
Copy link
Contributor

@foochifa foochifa commented Oct 24, 2023

Problem

A couple of UI problems was surfaced during the QA:

  1. Empty scrollbars rendering beside folder tab grid and form rows grid
  2. Create form button will overflow on smaller viewports
  3. Empty new folders title and subtitle are not center-ed, can be seen in mobile view
  4. Mobile row action drawer state is not reset at drawer closure
  5. Rename modal does not reset value after closing the modal
  6. Folder name is too long to ever be displayed

Solution

  1. Set overflowY='auto' instead of scroll
  2. Fix minW of form button to be 154px inline with design
  3. Set textAlign='center' for title and sub text of EmptyNewWorkspace`
  4. On closing row action drawer, will reset the state of move workspace to false
  5. Conditionally render rename modal depending on whether it is opened
  6. Reduced max folder name to 25 cha (sufficient to display fully on our maxW)

Breaking Changes

  • Yes - this PR contains breaking changes
    • Details ...
  • No - this PR is backwards compatible

Before & After Screenshots

BEFORE:

AFTER:

Tests

  • In mac scroll bar settings, make sure scroll bar is shown always
  • Go to dashboard, make sure there isn't any grey empty scrollbars beside workspace tabs and form row container
  • In responsive layout, reduce the X resolution of your window to <1024, make sure that the words in the create button do not overflow out of the button
  • In mobile mode, create a new folder
  • Ensure the title and subtext are centered
  • On any form pen a row action drawer, move a form to a folder
  • Close the drawer
  • Reopen the drawer, it should return to the default drawer and not the move to workspace drawer
  • Open the folder rename modal
  • Enter some value
  • Close the modal
  • Reopen it, the value should reset
  • Create a new form with >25 cha title, it should fail
  • Rename a form to >25 cha, it should fail
  • Use curl to create a new form with >25 cha title, it should fail

@foochifa foochifa marked this pull request as ready for review October 24, 2023 15:07
Copy link
Contributor

@tshuli tshuli left a comment

Choose a reason for hiding this comment

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

minor nits, lgtm!

@foochifa foochifa merged commit 720a9b3 into form-v2/form-workspaces Oct 25, 2023
12 checks passed
@foochifa foochifa deleted the form-v2/folders-qa-fixes branch October 25, 2023 07:18
foochifa added a commit that referenced this pull request Oct 25, 2023
* feat(form-workspaces): add workspace api endpoints (#4182)

* feat: add get workspaces endpoint skeleton

* feat: add create workspace API endpoint

* feat: add update workspace title API endpoint

* feat: add delete workspace API endpoint

* feat: add get workspace forms API endpoint

* feat: add delete workspace forms API endpoint

* feat: add move workspace forms API endpoint

* feat: add auth and logging for workspace routes

* feat: update workspace service to take in necessasry parameters

* feat: add request body for delete workspace api

* feat(form-workspaces-be/1): add workspace db model (#4200)

* feat: add workspace database model

* feat: add workspace db model tests

* refactor: update variable naming in workspace tests

* feat: update workspace formId validation to test for existent admin

* feat: add WorkspaceDto

* fix: update workspace formIds validation rules

* fix: removed unused database fields renaming

* refactor: simplify expression for workspace formIds validation

* feat: add timestamps for workspace db model

* fix: add more workspace model tests and rename test descriptions

* fix: reduce maximum title length of workspace to 50 chars

* feat(form-workspaces-be/2): add get workspaces functionality (#4247)

* fix: removed unused database fields renaming

* feat: add timestamps for workspace db model

* feat: add get workspaces functionality

* feat: add get workspaces tests

* feat: update workspace mapRouteError to include more MongoErrors

* refactor: remove unused MissingUserError in workspace service

* fix: include _id in Workspace type

* feat: add test to check workspace ordering in GET API

* refactor: rename mock constant in model tests

* refactor: remove unused virtual count in workspace model

* feat: add controller test for database conflict error

* feat(form-workspaces-be/3): add create workspace logic  (#4251)

* feat: add create workspace functionality

* feat: add tests for create workspace functionality

* fix: remove return type for create workspace method in model

* feat: add database conflict error test for workspace controller

* fix: failing tests

* fix: update joi validation for workspace title to 50 chars

* feat(form-workspaces-be/4): add update workspace title logic (#4252)

* feat: add update workspace title functionality

* feat: add update workspace title functionality tests

* refactor: workspace model to simplify function call

* feat: add workspace admin permissions check for udpate workspace title

* fix: return appropriate error when unable to update workspace title

* refactor: use object arguments for updateWorkspaceTitle

* fix: broken test cases

* feat: add route test for update title when user has no permissions

* refactor: remove admin field from updateWorkspaceTitle

* fix: update workspace validation implementation

* refactor: workspace utils error messaging

* feat(form-workspaces/1): add form workspaces side menu (#4041)

* refactor: move Workspace contents to a WorkspaceContent component

* feat: add side menu view to WorkspacePage

* feat: add mobile view for workspace page

* feat: use msw for GET workspaces instead of hardcoding in WorkspacePage

* refactor: WorkspacePage to combine mobile and desktop views

* fix: update size and page validation in useWorkspaceForms

* fix: remove react rollout banner since workspaces is released after rollout

* feat: update workspace page to include AdminNavBar

* feat(form-workspaces/2): add form workspaces modals (#4051)

* feat: add create workspace modal view for desktop and mobile

* refactor: move create workspace modal to CreateOrRenameWorkspaceModal.tsx

* feat: add storybook for create workspace modal

* feat: add edit workspace icon button

* chore: cleanup unused formCount prop in WorkspaceHeader

* feat: add rename workspace modal

* feat: add storybook for rename workspace modal

* feat: add delete workspace modal

* feat: add delete workspace modal storybook

* refactor: split CreateOrRenameWorkspaceModal to Create and Rename modals

* feat: add RenameWorkspaceModal storybook

* fix: add isFullWidth for mobile viewport modal buttons

* refactor: cleanup unused minLength validator in workspaceValidation

* feat(form-workspaces-be/5): add delete workspace logic (#4254)

* feat: add delete workspace functionality

* feat: add delete workspace functionality tests

* refactor: use object function argument for deleteWorkspace

* fix: move deleteWorkspace transaction logic to WorkspaceService

* feat: update deleteWorkspace to return boolean instead of void

* refactor: deleteWorkspace transaction to use mongoose withTransaction

* fix: use form document method to archive forms instead of static method

This resolves the issue of failing transaction due to 'nearest' readPreference for FormSchema.
Setting readPreference for static queries throws an error.

* fix: tests for deleteWorkspace functionality

* refactor: remove admin field from deleteWorkspace

* fix: delete workspace transaction to update model instead of documents

Fixed the readPreference issue in multi-document transactions by setting
readPreference in updateMany function on FormModel to be 'primary'

* refactor: workspace service test to reduce db queries

* fix: remove unused session parameter from form model archive method

* feat(form-workspaces-be/7): add move forms from multiple source workspaces functionality (#6418)

* feat: add delete workspace functionality

* feat: add delete workspace functionality tests

* refactor: use object function argument for deleteWorkspace

* fix: move deleteWorkspace transaction logic to WorkspaceService

* feat: update deleteWorkspace to return boolean instead of void

* refactor: deleteWorkspace transaction to use mongoose withTransaction

* fix: use form document method to archive forms instead of static method

This resolves the issue of failing transaction due to 'nearest' readPreference for FormSchema.
Setting readPreference for static queries throws an error.

* fix: tests for deleteWorkspace functionality

* refactor: remove admin field from deleteWorkspace

* fix: delete workspace transaction to update model instead of documents

Fixed the readPreference issue in multi-document transactions by setting
readPreference in updateMany function on FormModel to be 'primary'

* refactor: workspace service test to reduce db queries

* fix: remove unused session parameter from form model archive method

* fix: add new flag to deleteWorkspace findOneAndDelete

* feat: add move forms to another workspace functionality

* test: happy path remove and add formIds to workspace

* test: fix delete and add move form happy path workspace routes

* test: happy path test for workspace service move form

* test: add error test for workspace routes

---------

Co-authored-by: Hans Tirtaputra <[email protected]>

* test: modernise test cases

* feat(workspaces): Integrating BE with FE (#6560)

* feat: add api services for workspace

* feat: update Workspace page with default workspace

* feat: update workspace context

* feat: add workspace mutations

* chore: trim workspace content props

* feat: add functionality for rename and delete workspace

* feat: add default workspace to menu

* feat: implement create workspace

* feat: update workspace header

* feat: implement row action and move form to workspace

* feat: remove workspace mocks from browser

* feat: remove form from workspaces after archive

* feat: reset rename modal useform value

* fix: do not mutate if title is same

* fix: move to selected workspace even form exists

* fix: do not switch to workspace after moving

* fix: mobile mode for workspace

* chore: clean unused attributes

* chore: improve spacing for desktop workspace header

* chore: improve spacing for mobile view too

* fix: align workspace with develop

* fix: useQuery keys

* feat: delete workspace message

* fix: BE tests

* fix: delete workspace copy

* chore: abstract out use context form workspace modals

* fix: mock workspace for storybook

* fix: mobile workspace page grid and menu padding

* feat: display checkbox on form's current workspace

* feat: use callback and memo for workspace row actions

* feat: mobile drawer actions

* fix: move emptyworkspace to WorkspaceContent

* fix(workspaces): remove form from workspace upon collaborator removal (#6592)

* fix: remove form from workspace upon collaborator removal

* fix: typing of default workspace

* fix: return promise and catch error

* fix(workspaces): workspace design review (#6632)

* fix: UI updates from design review

* feat: change text style of default workspace

* feat: bold deleted workspace name

* feat: drawer for mobile workspace edit

* fix: separate form count from the workspace title

* feat: update workspace content and removed unused WorkspacePageContent

* feat: update empty workspace component with folder variation

* feat: display emptyworkspace based on whether default

* chore: copy fixes

* chore: copy for aria-label

* feat(workspaces): create and duplicate form into active workspace (#6755)

* feat: create and move form to workspace transaction

* feat: inject workspace Id to create form handler

* fix: promise return of create form transaction

* fix: invalidate workspace query cache when creating form

* feat: allow for optional workspaceId param in duplicate form

* feat: update dupe form wizard to duplicate to active workspace

* fix: do not send workspaceId if is default workspace

* test: fix admin controller tests

* test: add workspaceId test to admin controller

* chore: abstract processing of form into workspace for testing

* test: form into workspace processing

* chore: use duplicate dto for duplicate controller

* chore: use duplicate dto in FE mutations

* docs: improve explanation of workspaceId logic

* chore: use CreateFormBodyDto type for validator

* feat(workspaces): remove form from workspace (#6754)

* feat: route to remove workspace from forms

* feat: FE mutation to remove form from workspaces

* feat: add remove form from workspace to row actions

* chore: remove deprecated workspace form routes

* fix: design review

* fix: show workspace header for empty workspaces

* fix: span the workspace content

* test: workspace route test for removing from

* feat: use a post request for removing forms for extensibility

* test: update tests

* fix: update remove form workspace service users

* test: fix admin form controller tests

* refactor: abstract out empty workspace components

* chore: update meta action name and messages

* refactor: de-DRY workspace click

* chore: remove unused method and imports

* fix: revert mobile margins

* fix: prevent overflow of folder name in mobile

* feat(workspaces): feature announcement  (#6831)

* chore: update copy of workspace validation messages

* chore: remove bolding from workspace titel

* feat: folders feature announcement

* fix: conditional rendering of create workspace modal

* fix: change border to grid level

* fix: make content bg always neutral 100

* fix: apply column length to both md and lg

* fix: create form modal stories

* fix: additional provider for create default modal

* fix(workspaces): QA issues (#6836)

* fix: empty grey scrollbars

* fix: alignment of text in empty folder

* fix: reduce length of workspace title to 25

* fix: add min width to button to prevent text overflow

* fix: conditionally rename modal

* fix: reset move workspace state on close

* fix: use constants for min and max title length

* fix: use rem over px

* fix(workspaces): use svg for announcement and what's new (#6839)

* feat: use svg

* feat: use svg instead of animation json

* ref: add type to AnnouncementsFeatureList

* fix: use correct import file path

* fix: change announcement date to 2023-10-26

* fix: delete unused json

* fix: typing error of arg of archiveForms

---------

Co-authored-by: Hans Sebastian Tirtaputra <[email protected]>
Co-authored-by: wanlingt <[email protected]>
wanlingt added a commit that referenced this pull request Oct 30, 2023
* feat(form-workspaces): add workspace api endpoints (#4182)

* feat: add get workspaces endpoint skeleton

* feat: add create workspace API endpoint

* feat: add update workspace title API endpoint

* feat: add delete workspace API endpoint

* feat: add get workspace forms API endpoint

* feat: add delete workspace forms API endpoint

* feat: add move workspace forms API endpoint

* feat: add auth and logging for workspace routes

* feat: update workspace service to take in necessasry parameters

* feat: add request body for delete workspace api

* feat(form-workspaces-be/1): add workspace db model (#4200)

* feat: add workspace database model

* feat: add workspace db model tests

* refactor: update variable naming in workspace tests

* feat: update workspace formId validation to test for existent admin

* feat: add WorkspaceDto

* fix: update workspace formIds validation rules

* fix: removed unused database fields renaming

* refactor: simplify expression for workspace formIds validation

* feat: add timestamps for workspace db model

* fix: add more workspace model tests and rename test descriptions

* fix: reduce maximum title length of workspace to 50 chars

* feat(form-workspaces-be/2): add get workspaces functionality (#4247)

* fix: removed unused database fields renaming

* feat: add timestamps for workspace db model

* feat: add get workspaces functionality

* feat: add get workspaces tests

* feat: update workspace mapRouteError to include more MongoErrors

* refactor: remove unused MissingUserError in workspace service

* fix: include _id in Workspace type

* feat: add test to check workspace ordering in GET API

* refactor: rename mock constant in model tests

* refactor: remove unused virtual count in workspace model

* feat: add controller test for database conflict error

* feat(form-workspaces-be/3): add create workspace logic  (#4251)

* feat: add create workspace functionality

* feat: add tests for create workspace functionality

* fix: remove return type for create workspace method in model

* feat: add database conflict error test for workspace controller

* fix: failing tests

* fix: update joi validation for workspace title to 50 chars

* feat(form-workspaces-be/4): add update workspace title logic (#4252)

* feat: add update workspace title functionality

* feat: add update workspace title functionality tests

* refactor: workspace model to simplify function call

* feat: add workspace admin permissions check for udpate workspace title

* fix: return appropriate error when unable to update workspace title

* refactor: use object arguments for updateWorkspaceTitle

* fix: broken test cases

* feat: add route test for update title when user has no permissions

* refactor: remove admin field from updateWorkspaceTitle

* fix: update workspace validation implementation

* refactor: workspace utils error messaging

* feat(form-workspaces/1): add form workspaces side menu (#4041)

* refactor: move Workspace contents to a WorkspaceContent component

* feat: add side menu view to WorkspacePage

* feat: add mobile view for workspace page

* feat: use msw for GET workspaces instead of hardcoding in WorkspacePage

* refactor: WorkspacePage to combine mobile and desktop views

* fix: update size and page validation in useWorkspaceForms

* fix: remove react rollout banner since workspaces is released after rollout

* feat: update workspace page to include AdminNavBar

* feat(form-workspaces/2): add form workspaces modals (#4051)

* feat: add create workspace modal view for desktop and mobile

* refactor: move create workspace modal to CreateOrRenameWorkspaceModal.tsx

* feat: add storybook for create workspace modal

* feat: add edit workspace icon button

* chore: cleanup unused formCount prop in WorkspaceHeader

* feat: add rename workspace modal

* feat: add storybook for rename workspace modal

* feat: add delete workspace modal

* feat: add delete workspace modal storybook

* refactor: split CreateOrRenameWorkspaceModal to Create and Rename modals

* feat: add RenameWorkspaceModal storybook

* fix: add isFullWidth for mobile viewport modal buttons

* refactor: cleanup unused minLength validator in workspaceValidation

* feat(form-workspaces-be/5): add delete workspace logic (#4254)

* feat: add delete workspace functionality

* feat: add delete workspace functionality tests

* refactor: use object function argument for deleteWorkspace

* fix: move deleteWorkspace transaction logic to WorkspaceService

* feat: update deleteWorkspace to return boolean instead of void

* refactor: deleteWorkspace transaction to use mongoose withTransaction

* fix: use form document method to archive forms instead of static method

This resolves the issue of failing transaction due to 'nearest' readPreference for FormSchema.
Setting readPreference for static queries throws an error.

* fix: tests for deleteWorkspace functionality

* refactor: remove admin field from deleteWorkspace

* fix: delete workspace transaction to update model instead of documents

Fixed the readPreference issue in multi-document transactions by setting
readPreference in updateMany function on FormModel to be 'primary'

* refactor: workspace service test to reduce db queries

* fix: remove unused session parameter from form model archive method

* feat(form-workspaces-be/7): add move forms from multiple source workspaces functionality (#6418)

* feat: add delete workspace functionality

* feat: add delete workspace functionality tests

* refactor: use object function argument for deleteWorkspace

* fix: move deleteWorkspace transaction logic to WorkspaceService

* feat: update deleteWorkspace to return boolean instead of void

* refactor: deleteWorkspace transaction to use mongoose withTransaction

* fix: use form document method to archive forms instead of static method

This resolves the issue of failing transaction due to 'nearest' readPreference for FormSchema.
Setting readPreference for static queries throws an error.

* fix: tests for deleteWorkspace functionality

* refactor: remove admin field from deleteWorkspace

* fix: delete workspace transaction to update model instead of documents

Fixed the readPreference issue in multi-document transactions by setting
readPreference in updateMany function on FormModel to be 'primary'

* refactor: workspace service test to reduce db queries

* fix: remove unused session parameter from form model archive method

* fix: add new flag to deleteWorkspace findOneAndDelete

* feat: add move forms to another workspace functionality

* test: happy path remove and add formIds to workspace

* test: fix delete and add move form happy path workspace routes

* test: happy path test for workspace service move form

* test: add error test for workspace routes

---------

Co-authored-by: Hans Tirtaputra <[email protected]>

* test: modernise test cases

* feat(workspaces): Integrating BE with FE (#6560)

* feat: add api services for workspace

* feat: update Workspace page with default workspace

* feat: update workspace context

* feat: add workspace mutations

* chore: trim workspace content props

* feat: add functionality for rename and delete workspace

* feat: add default workspace to menu

* feat: implement create workspace

* feat: update workspace header

* feat: implement row action and move form to workspace

* feat: remove workspace mocks from browser

* feat: remove form from workspaces after archive

* feat: reset rename modal useform value

* fix: do not mutate if title is same

* fix: move to selected workspace even form exists

* fix: do not switch to workspace after moving

* fix: mobile mode for workspace

* chore: clean unused attributes

* chore: improve spacing for desktop workspace header

* chore: improve spacing for mobile view too

* fix: align workspace with develop

* fix: useQuery keys

* feat: delete workspace message

* fix: BE tests

* fix: delete workspace copy

* chore: abstract out use context form workspace modals

* fix: mock workspace for storybook

* fix: mobile workspace page grid and menu padding

* feat: display checkbox on form's current workspace

* feat: use callback and memo for workspace row actions

* feat: mobile drawer actions

* fix: move emptyworkspace to WorkspaceContent

* fix(workspaces): remove form from workspace upon collaborator removal (#6592)

* fix: remove form from workspace upon collaborator removal

* fix: typing of default workspace

* fix: return promise and catch error

* fix(workspaces): workspace design review (#6632)

* fix: UI updates from design review

* feat: change text style of default workspace

* feat: bold deleted workspace name

* feat: drawer for mobile workspace edit

* fix: separate form count from the workspace title

* feat: update workspace content and removed unused WorkspacePageContent

* feat: update empty workspace component with folder variation

* feat: display emptyworkspace based on whether default

* chore: copy fixes

* chore: copy for aria-label

* feat(workspaces): create and duplicate form into active workspace (#6755)

* feat: create and move form to workspace transaction

* feat: inject workspace Id to create form handler

* fix: promise return of create form transaction

* fix: invalidate workspace query cache when creating form

* feat: allow for optional workspaceId param in duplicate form

* feat: update dupe form wizard to duplicate to active workspace

* fix: do not send workspaceId if is default workspace

* test: fix admin controller tests

* test: add workspaceId test to admin controller

* chore: abstract processing of form into workspace for testing

* test: form into workspace processing

* chore: use duplicate dto for duplicate controller

* chore: use duplicate dto in FE mutations

* docs: improve explanation of workspaceId logic

* chore: use CreateFormBodyDto type for validator

* feat(workspaces): remove form from workspace (#6754)

* feat: route to remove workspace from forms

* feat: FE mutation to remove form from workspaces

* feat: add remove form from workspace to row actions

* chore: remove deprecated workspace form routes

* fix: design review

* fix: show workspace header for empty workspaces

* fix: span the workspace content

* test: workspace route test for removing from

* feat: use a post request for removing forms for extensibility

* test: update tests

* fix: update remove form workspace service users

* test: fix admin form controller tests

* refactor: abstract out empty workspace components

* chore: update meta action name and messages

* refactor: de-DRY workspace click

* chore: remove unused method and imports

* fix: revert mobile margins

* fix: prevent overflow of folder name in mobile

* feat(workspaces): feature announcement  (#6831)

* chore: update copy of workspace validation messages

* chore: remove bolding from workspace titel

* feat: folders feature announcement

* fix: conditional rendering of create workspace modal

* fix: change border to grid level

* fix: make content bg always neutral 100

* fix: apply column length to both md and lg

* fix: create form modal stories

* fix: additional provider for create default modal

* fix(workspaces): QA issues (#6836)

* fix: empty grey scrollbars

* fix: alignment of text in empty folder

* fix: reduce length of workspace title to 25

* fix: add min width to button to prevent text overflow

* fix: conditionally rename modal

* fix: reset move workspace state on close

* fix: use constants for min and max title length

* fix: use rem over px

* fix(workspaces): use svg for announcement and what's new (#6839)

* feat: use svg

* feat: use svg instead of animation json

* ref: add type to AnnouncementsFeatureList

* fix: use correct import file path

* fix: change announcement date to 2023-10-26

* fix: delete unused json

* fix: typing error of arg of archiveForms

* fix: update release date to 31 oct 2023

---------

Co-authored-by: Hans Sebastian Tirtaputra <[email protected]>
Co-authored-by: Foo Chi Fa <[email protected]>
Co-authored-by: foochifa <[email protected]>
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.

3 participants