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

21824 Used textareas for latest review comments to preserve formatting #688

Merged
merged 2 commits into from
Jul 26, 2024

Conversation

severinbeauvais
Copy link
Collaborator

Issue #: bcgov/entity#21824

Description of changes:

  • app version = 7.3.19
  • added vue-auto-resize package (for textareas)
  • awaited async function in FilingHistoryList.vue
  • replaced paragraph with textarea in TodoList.vue
  • replaced paragraph with textarea in ContinuationIn.vue

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).

- added vue-auto-resize package (for textareas)
- awaited async function in FilingHistoryList.vue
- replaced paragraph with textarea in TodoList.vue
- replaced paragraph with textarea in ContinuationIn.vue
@@ -50,6 +50,7 @@
"sbc-common-components": "3.0.13",
"vue": "2.7.14",
"vue-affix": "^0.5.2",
"vue-auto-resize": "^1.0.1",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Same as in auth-web for the previous corrrespondence textareas.

// if needed, highlight a specific filing
if (this.highlightId) {
const index = this.getFilings.findIndex(f => (f.filingId === this.highlightId))
if (index >= 0) { // safety check
this.toggleFilingHistoryItem(index)
await this.toggleFilingHistoryItem(index)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Although this is now correct, previously it was OK because onFilingsChange() runs in the background anyway, and there was no effect if toggleFilingHistoryItem() continued to run even after onFilingsChange() exited (which is what happens when you don't await an async method).

if (this.tempRegNumber) {
// auto-expand bootstrap filing
// assumes this the only filing in the Filing History list (which it should be)
this.setPanel(0)
await this.toggleFilingHistoryItem(0)
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, we do want to wait for toggleFilingHistoryItem() to complete before we enable the textarea. This is a work-around for a bug in the textarea where it sometimes doesn't auto-resize (where its height=0 even when there is text content).

@severinbeauvais
Copy link
Collaborator Author

/gcbrun

@bcregistry-sre
Copy link
Collaborator

bcregistry-sre commented Jul 26, 2024

@severinbeauvais
Copy link
Collaborator Author

Screenshots

Change requested comment:
image

Rejected comment:
image

Copy link
Collaborator

@ArwenQin ArwenQin left a comment

Choose a reason for hiding this comment

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

Looks good! And I see the unit tests are also updated.

Copy link

sonarcloud bot commented Jul 26, 2024

@bcregistry-sre
Copy link
Collaborator

Temporary Url for review: https://business-filings-dev--pr-688-7zmow8rm.web.app

@severinbeauvais severinbeauvais merged commit c0a4035 into bcgov:main Jul 26, 2024
6 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