-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Refactor FXIOS-7301 - Reduce from 390 to 42 lines a property of AddressBarState.swift - help in closure_body_length #22711
base: main
Are you sure you want to change the base?
Refactor FXIOS-7301 - Reduce from 390 to 42 lines a property of AddressBarState.swift - help in closure_body_length #22711
Conversation
This pull request has conflicts when rebasing. Could you fix it @ionixjunior? 🙏 |
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.
Looks great 🎉 . Nit things i would change the handle methods name to be (e.g)handleToolbarNumberOfTabsChanged
to handleNumberOfTabsChangedAction
and also Rebase is needed since i noticed some new actions were added.
4c04fd6
to
bc32500
Compare
Sure, it makes sense. I'll update this in this another PR #22679. Updated and rebased. |
This pull request has conflicts when rebasing. Could you fix it @ionixjunior? 🙏 |
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.
🎉 super. There is only needed a rebase and we can merge it.
📜 Tickets
Jira ticket
Github issue
💡 Description
This PR reduces from 390 to 42 lines of the
reducer
property from theAddressBarState.swift
file by extracting the switch case statements to new functions.The current threshold is 30, and I wasn't able to meet that in this PR. We might need to consider adjusting the threshold or allowing exceptions when we enable this rule. I'm open to any suggestions.
This PR is part of a series of PRs described here #16442 (comment).
📝 Checklist
You have to check all boxes before merging
@Mergifyio backport release/v120
)