Skip to content

LG-14958#11746

Merged
WilliamBirdsall merged 1 commit intomainfrom
will/LG-14958
Jan 16, 2025
Merged

LG-14958#11746
WilliamBirdsall merged 1 commit intomainfrom
will/LG-14958

Conversation

@WilliamBirdsall
Copy link
Contributor

🎫 Ticket

Link to the relevant ticket:
LG-14958

🛠 Summary of changes

This ticket evolves removing the in_person_full_address_entry_enabled flag, which should no longer be toggle-able.

@WilliamBirdsall WilliamBirdsall marked this pull request as draft January 14, 2025 14:46
@WilliamBirdsall WilliamBirdsall marked this pull request as ready for review January 14, 2025 19:03
@WilliamBirdsall WilliamBirdsall requested review from a team, KeithNava and gina-yamada and removed request for KeithNava January 14, 2025 19:03
Copy link
Contributor

@eileen-nava eileen-nava left a comment

Choose a reason for hiding this comment

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

Approved. I left non-blocking comments. Good work, Will. 👏🏻

const inPersonLocationPostOfficeSearchForm = inPersonFullAddressEntryEnabled
? InPersonLocationFullAddressEntryPostOfficeSearchStep
: InPersonLocationPostOfficeSearchStep;
const inPersonLocationPostOfficeSearchForm = InPersonLocationFullAddressEntryPostOfficeSearchStep;
Copy link
Contributor

Choose a reason for hiding this comment

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

I only see the variable inPersonLocationPostOfficeSearchForm used once in this file, on L96 in the creation of locationFormStep. Is there any downside to removing the variable inPersonLocationPostOfficeSearchForm and just using InPersonLocationFullAddressEntryPostOfficeSearchStep on L96?

end

context 'when full form address entry is enabled for post office search' do
context 'when full form address post office search' do
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: This could probably be condensed into just an it statement.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh like we can remove the wrapping context? Wasn't sure if it was helpful due to the user creation line directly under it, but I guess there aren't any other it blocks that would use that so removing is probably a good idea.

Ill be in here again once the form is simplified to zip. Should add to that ticket to make sure test structure is as simple as possible? Or just simplify it now?

Copy link
Contributor

Choose a reason for hiding this comment

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

To me, the context block felt unnecessary because the user will always be using full form address post office search. I would see the value if we had another option enabled, like searching by zip code, but that's not the app's current state.

I also think simplifying this to an it statement felt consistent with the top of the file, which uses it statements for conditions that I'd always expect to be true. For example, in the same way that we expect the app to always allow the user to cancel and start over from the beginning, we expect the app to always allow the user to search by full address. Does that make sense?

The it block I used as an example creates the user variable inside of it, and I generally prefer to create that kind of variable outside of it blocks with a let statement. So, maybe the example I'm using isn't the best, either. 😆 I'm also good with you leaving this code as is! It's up to you. The comment is a non-blocking nit.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Definitely makes sense! I think ill keep it in there for this PR but it will probably change across the next couple PRs that deal more directly with zip stuff and code removal. I agree with your thinking for sure!

import SelfieStep from './selfie-step';
import DocumentsStep from './documents-step';
import InPersonPrepareStep from './in-person-prepare-step';
import InPersonLocationPostOfficeSearchStep from './in-person-location-post-office-search-step';
Copy link
Contributor

Choose a reason for hiding this comment

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

This is the only place that the component is used, can we remove the file at in-person-location-post-office-search-step.tsx?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is another ticket for actually removing the old code, so that will be deleted next!

@WilliamBirdsall WilliamBirdsall merged commit 41f8d41 into main Jan 16, 2025
@WilliamBirdsall WilliamBirdsall deleted the will/LG-14958 branch January 16, 2025 18:57
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