Skip to content

Namerequest UI: Replace Vuex with Pinia (part 2) #30987

Closed

Description

@severinbeauvais

Comment from Oct 7, 2025:
image.png

This sub-task addresses compatibility issues caused by outdated tooling in the NameRequest project:

The current project uses vue-cli-service, which is deprecated. Migrating to Vite will modernize the build setup and eliminate many TypeScript errors originating from node_modules. already done in #29274

The latest version of sbc-common-components has transitioned to Pinia for state management, while this project still uses Vuex, leading to potential integration issues.

As part of this task, evaluate and begin replacing Vuex with Pinia to align with shared component expectations.

To ensure sbc-common-components works smoothly across both Vue CLI and Vite projects, would it be possible to ask the team in charge of the common component:

  • Publish a compiled build (e.g., dist/ or lib/)
  • Export components and utilities from a top-level index.ts
  • And mark shared libraries like vue and axios as peerDependencies?

Activity

  1. added
    Names Team
    Entities Team
    on Oct 7, 2025
  2. severinbeauvais commented on Oct 7, 2025

    @severinbeauvais
    CollaboratorAuthor

    This ticket is a pre-requisite for fixing the account id not being retained when the user navigates to/from Namerequest UI.

    Update: This ticket first required the Vite upgrade, and is itself a pre-requisite for synchronizing the account id between UIs.

  3. changed the title [-]Copy of Namerequest UI: Migrate the project from Vue CLI to Vite + replace Vuex with Pinia[/-] [+]Copy of Namerequest UI: Replace Vuex with Pinia (part 2)[/+] on Oct 7, 2025
  4. severinbeauvais commented on Oct 7, 2025

    @severinbeauvais
    CollaboratorAuthor

    Sample changes for Vite migration:
    bcgov/business-filings-ui#540
    bcgov/business-edit-ui#524

    Sample changes for Pinia migration:
    bcgov/business-filings-ui#500
    bcgov/business-edit-ui#472

  5. severinbeauvais commented on Oct 7, 2025

    @severinbeauvais
    CollaboratorAuthor

    Eve wrote:

    To ensure sbc-common-components works smoothly across both Vue CLI and Vite projects

    In my experience (across the other Entity UIs), sbc-common-components works exactly the same between Vue CLI and Vite projects -- the subject framework tools only have a build impact, not a runtime impact.

    Part of Eve's question referred to deploying sbc-common-components and importing it differently. I believe this is out of scope of THIS ticket. THIS ticket is only to upgrade Namerequest UI to PINIA.

    Update: Namerequest UI "patches" an older version of the imported sbc-common-components library because it can't use the latest library version... yet. The Pinia upgrade will unlock this, allowing the use of the latest library and enabling the use of the Account Id to retain the account when navigating between UIs (which is a separate ticket probably).

  6. severinbeauvais commented on Oct 7, 2025

    @severinbeauvais
    CollaboratorAuthor

    Test Notes for Pinia upgrade

    I have tested the following. Please verify as needed.

    1. mobile display works (app width < 960)
    2. creating a new NR works as before (all pages)
    3. managing an existing NR works as before (all pages)
    4. editing an existing NR works
    5. downloading receipts/PDFs works
    6. upgrading priority works disabled during job action
    7. cancel and refund works
    8. all expected dialogs open and close correctly (eg, confirm payment, receipts, cancel)
    9. no errors in console (except permissions call when not logged in)
    10. business search works (eg, when logged in, can search for business to change name)
    11. business fetch works (eg, when not logged in, can fetch business to change name) -- try a BCROS business and a COLIN-only business
    12. MRAS search works (eg, xpro registration from AB)
    13. error dialog displays (eg, change network to offline and download receipt PDF)
    14. login works
    15. logout works
    16. change account works
    17. any other flow or page or action you can think of

    Please verify the above while logged in (reg user + staff) and while not not logged in (ie, anonymous).

  7. changed the title [-]Copy of Namerequest UI: Replace Vuex with Pinia (part 2)[/-] [+]Namerequest UI: Replace Vuex with Pinia (part 2)[/+] on Oct 7, 2025
  8. janisrogers commented on Oct 29, 2025

    @janisrogers
    Collaborator

    I don't see any UXA work here. Moving to Ready for QA.

  9. riyazuddinsyed commented on Nov 7, 2025

    @riyazuddinsyed
    Contributor

    Verified in the dev environment.Working as expected..

  10. gunanagar commented on Nov 18, 2025

    @gunanagar
    Collaborator

    Tested, all good. Closing this ticket

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Entities TeamNames Teamtechdebt

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions