-
Notifications
You must be signed in to change notification settings - Fork 45
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
17468 Refactored search.vue + implemented xpro aml flow #674
17468 Refactored search.vue + implemented xpro aml flow #674
Conversation
d3f4a0f
to
0d97c55
Compare
Sev, I'll stop doing any work in this UI after merging my latest small PR. |
d690058
to
fef2f48
Compare
40c2d08
to
09f8a02
Compare
id="name-input-component" | ||
:is-mras-search="!isNameSearch" | ||
/> | ||
<NameInput :is-mras-search="!isNameSearch" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
id
is already set in the component.
@@ -89,7 +89,6 @@ export default class Tabs extends Mixins(CommonMixin) { | |||
|
|||
.mobile-font { | |||
font-size: $px-14; | |||
max-width: 120px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
companyType: CompanyTypes | ||
jurisdiction: any | ||
request: RequestActionsI | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I struggled for a while with reactivity on variables in the search mixin and the components sometimes not seeing the changes. Ultimately, it looks like there can only be 1 watcher or reactive statement for them. So, I moved the variables to the store instead, and now reactivity works as expected: everyone can see all changes,
@@ -16,6 +16,12 @@ | |||
</keep-alive> | |||
</transition> | |||
</div> | |||
|
|||
<!-- FOR DEBUGGING --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once again, I'll delete this and the block below before my final commit.
95f9734
to
c06653b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm doing some more cleanup in here before we merge this PR (to make it easier for several people to work in here at the same time).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get now the direction you want to push the code towards. The code already looks much better and easier to work in / understand.
c06653b
to
8e8e642
Compare
@@ -0,0 +1,52 @@ | |||
<template> | |||
<div id="corp-number-checkbox"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: this component is NOT a v-col like the others.
<template> | ||
<v-col id="entity-type" :cols="cols" :md="md"> | ||
<v-text-field | ||
v-if="isConversion && isBenBusiness" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logic should be moved to the parent.
Correction -- this logic belongs here as it's a special case for BEN conversions. Otherwise the code block below is used. This is probably a temporary situation (only some alterations are supported atm).
@@ -0,0 +1,54 @@ | |||
<template> | |||
<v-col id="numbered-company-bullets" :cols="cols" :md="md"> | |||
<template v-if="isConversion && !isAlterOnline(getConversionType)"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's another special case, where this component always displays but, depending on the conditionals, some code block or another is displayed.
My point is that logic on whether to display a component belongs in the parent, but within a component there can be some special cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, big changes here.
- most code blocks are now sub-components
- there is a search-mixin that contains common imports and getters, etc
- some components still contain some logic that is specific to them only
- some of the common search variables are now in the store (for reactivity)
- all flows are now separate!
- there is a bit of common code at the top of the template (request action menu) and also at the bottom (buttons)
- logic for displaying components should be in here, not in the sub-component (except for some special cases)
- implemented sub-components for search.vue blocks - refactored search.vue to separate flows using sub-components (STILL WIP) - fixed tab title size on small screens - added search variables to store - created search-mixin.ts for common getters, setters, etc. - misc cleanup
8e8e642
to
e3e4715
Compare
There's no point in creating a temp URL for this as we're all going to run it locally shortly :) Once this is merged, I'll set up a quick meeting to walk you through the changes and how I expect the new code to look. |
Sounds good! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
4d9fa0e
into
bcgov:feature-search-refactor
Issue #: bcgov/entity#17468
This is incomplete code! What I have in mind is merging to this to a feature branch where several of us can rebuild the flows using the new architecture. And we can compare these flows to what's currently in Dev.
Description of changes:
- app version = 5.1.0
- implemented sub-components for search.vue blocks
- refactored search.vue to separate flows using sub-components (STILL WIP)
- fixed tab title size on small screens
- added search variables to store
- created search-mixin.ts for common getters, setters, etc.
- misc cleanup
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the namerequest license (Apache 2.0).