Skip to content

Enable/disable the add/remove model buttons at the right times#2964

Merged
robertbrignull merged 5 commits intomainfrom
robertbrignull/enable-add-multiple-models
Oct 16, 2023
Merged

Enable/disable the add/remove model buttons at the right times#2964
robertbrignull merged 5 commits intomainfrom
robertbrignull/enable-add-multiple-models

Conversation

@robertbrignull
Copy link
Copy Markdown
Contributor

Hooks up the disabled attribute for the add/remove model buttons in the model editor.

Uses the same logic as the method modeling panel, and pulls out the implementation to a shared location. Although it turns out the model editor doesn't need the logic for disabling the remove button, because it's never shown in situations when it would be disabled.

Also adds some tests that the buttons are shown / enabled at the right times.

Checklist

  • CHANGELOG.md has been updated to incorporate all user visible changes made by this pull request.
  • Issues have been created for any UI or other user-facing changes made by this pull request.
  • [Maintainers only] If this pull request makes user-facing changes that require documentation changes, open a corresponding docs pull request in the github/codeql repo and add the ready-for-doc-review label there.

@robertbrignull robertbrignull requested a review from a team as a code owner October 12, 2023 14:36
Comment thread extensions/ql-vscode/src/view/model-editor/__tests__/MethodRow.spec.tsx Outdated
Comment thread extensions/ql-vscode/src/view/model-editor/__tests__/MethodRow.spec.tsx Outdated
Comment thread extensions/ql-vscode/src/view/model-editor/__tests__/MethodRow.spec.tsx Outdated
@robertbrignull
Copy link
Copy Markdown
Contributor Author

I had to change around where the label on the button is, taking inspiration from

screen.getByLabelText("Next modeling").getElementsByTagName("input")[0],

@robertbrignull robertbrignull merged commit aa8896e into main Oct 16, 2023
@robertbrignull robertbrignull deleted the robertbrignull/enable-add-multiple-models branch October 16, 2023 10:04
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