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

refactor(InputBar): split logic into hooks and components #18753

Merged
merged 13 commits into from
Feb 18, 2025

Conversation

olafsulich
Copy link
Contributor

@olafsulich olafsulich commented Feb 14, 2025

Description

Reason:

  • incoming changes for Cells/Pydio are going to touch the InputBar scope, I'd like to work more seamlessly

Scope:

  • split logic into hooks, e.g. useDraftState, usePing, useGihpy, useFileHandling...
  • split JSX into components, e.g. InputBarButtons, InputBarContainer...
  • grouped logic, e.g. if a hook exists only in component "X", then store in inside the component's "X" folder

Rules:

  • the logic remained the same as it was, in some places I changed how functions "look", so its name and little tweaks about structure
  • working tests (one was deleted & replaced, it was a simple unit)
  • it doesn't need to be "perfect", just made it more clean and simple, allowing me to work faster soon
  • i didn't want to rebuild the whole thing

Checklist

  • mentions the JIRA issue in the PR name (Ex. [WPB-XXXX])
  • PR has been self reviewed by the author;
  • Hard-to-understand areas of the code have been commented;
  • If it is a core feature, unit tests have been added;

@olafsulich olafsulich marked this pull request as ready for review February 17, 2025 12:49
@olafsulich olafsulich requested review from otto-the-bot and a team as code owners February 17, 2025 12:49
@codecov-commenter
Copy link

codecov-commenter commented Feb 17, 2025

Codecov Report

Attention: Patch coverage is 55.07246% with 124 lines in your changes missing coverage. Please review.

Project coverage is 45.70%. Comparing base (0fe8969) to head (eecae85).
Report is 18 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev   #18753      +/-   ##
==========================================
+ Coverage   45.64%   45.70%   +0.05%     
==========================================
  Files         968      988      +20     
  Lines       27939    28038      +99     
  Branches     6303     6313      +10     
==========================================
+ Hits        12754    12814      +60     
- Misses      13596    13632      +36     
- Partials     1589     1592       +3     

Copy link
Contributor

@przemvs przemvs left a comment

Choose a reason for hiding this comment

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

Very nice improvement! 🚀

@olafsulich olafsulich merged commit 3ccc1bf into dev Feb 18, 2025
18 of 19 checks passed
@olafsulich olafsulich deleted the refactor/input-bar branch February 18, 2025 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants