Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

refactor(client): Use subcomponents for `InfoPanel` and `UserInfo`

Open rique223 opened this issue 1 year ago • 5 comments

Proposed changes (including videos or screenshots)

Refactored all places that use InfoPanel and UserInfo components as objects and implemented subcomponents and barrel exports/imports for both of them.

Jira task: CONN-268

Issue(s)

Steps to test or reproduce

Further comments

rique223 avatar May 22 '24 20:05 rique223

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is targeting the wrong base branch. It should target 6.11.0, but it targets 6.10.0

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

dionisio-bot[bot] avatar May 22 '24 20:05 dionisio-bot[bot]

⚠️ No Changeset found

Latest commit: a96c323db9ff97b25591cbf3326bfb12e96910dc

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar May 22 '24 20:05 changeset-bot[bot]

Codecov Report

Attention: Patch coverage is 42.85714% with 8 lines in your changes missing coverage. Please review.

Project coverage is 56.89%. Comparing base (ca3d90b) to head (a96c323).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #32470      +/-   ##
===========================================
+ Coverage    56.82%   56.89%   +0.06%     
===========================================
  Files         2497     2498       +1     
  Lines        55304    55345      +41     
  Branches     11405    11415      +10     
===========================================
+ Hits         31428    31490      +62     
+ Misses       21170    21152      -18     
+ Partials      2706     2703       -3     
Flag Coverage Δ
e2e 56.53% <42.85%> (+0.06%) :arrow_up:
unit 72.48% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

codecov[bot] avatar Jun 21 '24 17:06 codecov[bot]

Do you mind changing this notation to all places that uses InfoPanel subcomponents, so we can remove the exported object from apps/meteor/client/components/InfoPanel/index.ts

also prefer using import { subComponents } from '../InfoPanel/'

Btw, why so many commits?

Sure, will do. About the commits I am not entirely sure, this branch was checked out of the feat/new-user-panel-pending branch that was recently merged and when it happened git automatically rebased this branch to the develop and duplicated a lot of the commits that were merged in the other branch. I assumed that since the git diff is correct it wouldn't be a problem, but if there's anyway to remove those commits I'd like do know, I'll do a little research on this as well.

rique223 avatar Jun 21 '24 19:06 rique223

Do you mind changing this notation to all places that uses InfoPanel subcomponents, so we can remove the exported object from apps/meteor/client/components/InfoPanel/index.ts also prefer using import { subComponents } from '../InfoPanel/' Btw, why so many commits?

Sure, will do. About the commits I am not entirely sure, this branch was checked out of the feat/new-user-panel-pending branch that was recently merged and when it happened git automatically rebased this branch to the develop and duplicated a lot of the commits that were merged in the other branch. I assumed that since the git diff is correct it wouldn't be a problem, but if there's anyway to remove those commits I'd like do know, I'll do a little research on this as well.

For Future Reference:

The problem Doug mentioned was caused by squash merging the feat/new-user-panel-pending branch. When a branch is squash merged, all the commits in the pull request (PR) are combined into a single commit on the base branch. Because of this, Git loses the ability to track the individual commits from the original branch. If a child branch was created from the feat/new-user-panel-pending branch before the squash merge, it still contains those individual commits. As a result, when the child branch is compared or a PR is created from it, Git will not recognize that those commits were already merged, leading to duplicate commit history in the PR just like happened here;

rique223 avatar Jun 21 '24 22:06 rique223