Skip to content

31775 Add prop to disable ShareStructure buttons#299

Merged
severinbeauvais merged 4 commits intomainfrom
31775
Jan 30, 2026
Merged

31775 Add prop to disable ShareStructure buttons#299
severinbeauvais merged 4 commits intomainfrom
31775

Conversation

@severinbeauvais
Copy link
Collaborator

@severinbeauvais severinbeauvais commented Jan 30, 2026

Issue #: bcgov/entity#31775

You don't need to review any files in docs/. Those are generated Storybook files. Instead, you can checkout this PR and run npm run storybook.

Description of changes:

  • added prop to disable Add, Change and More Actions buttons
  • added unit tests
  • updated Storybook

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the business-filings-ui license (Apache 2.0).

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a disabled prop to the ShareStructure component to allow the parent to disable key share-structure action buttons (Add, Change, More Actions) when needed (eg, during higher-level workflows).

Changes:

  • Introduced a new disabled boolean prop on ShareStructure with a default of false.
  • Updated the “Add Share Class”, “Change” (per-class edit), and “More Actions” dropdown activator buttons to be disabled when either addEditInProgress is true or the new disabled prop is true.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Collaborator Author

@severinbeauvais severinbeauvais left a comment

Choose a reason for hiding this comment

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

These are the buttons I'm targeting:

Update: and also the series buttons!

image

const vuetify = new Vuetify({})
const localVue = createLocalVue()

const shareClassesOriginal: any = [
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I simply moved these objects out of the describe block so that I could use them in another describe block.


wrapper.destroy()
})
})
Copy link
Collaborator Author

@severinbeauvais severinbeauvais Jan 30, 2026

Choose a reason for hiding this comment

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

(I temporarily renamed the test class for this.)

image

Severin Beauvais added 2 commits January 30, 2026 12:03
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Here's the ShareStructure Alteration story with disabled=True:

image

Copy link
Collaborator

@cameron-eyds cameron-eyds left a comment

Choose a reason for hiding this comment

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

Looks great!

@severinbeauvais severinbeauvais merged commit e212868 into main Jan 30, 2026
7 checks passed
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