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

chore: Refactor RedirectBox to StudioRedirectBox #13908

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

wrt95
Copy link
Contributor

@wrt95 wrt95 commented Oct 24, 2024

Description

  • Refactor <RedirectBox /> to <StudioRedirectBox />
  • Replaced all usage
  • Added more tests
image

Related Issue(s)

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing done (required)
  • Relevant automated test added (if you find this hard, leave it and we'll help out)

@wrt95 wrt95 linked an issue Oct 24, 2024 that may be closed by this pull request
@github-actions github-actions bot added area/process Area: Related to app process (e.g. signing, receipt, fill inn, payment, etc). area/ui-editor Area: Related to the designer tool for assembling app UI in Altinn Studio. solution/studio/designer Issues related to the Altinn Studio Designer solution. frontend labels Oct 24, 2024
Copy link

codecov bot commented Oct 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.13%. Comparing base (bea682e) to head (54a7dc5).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13908      +/-   ##
==========================================
- Coverage   95.13%   95.13%   -0.01%     
==========================================
  Files        1677     1677              
  Lines       22238    22236       -2     
  Branches     2612     2612              
==========================================
- Hits        21157    21155       -2     
  Misses        835      835              
  Partials      246      246              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

title,
children,
className: givenClassName,
}: RedirectBoxProps): React.ReactElement => {
}: StudioRedirectBoxProps): ReactElement => {
const className = cn(classes.wrapper, givenClassName);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we use HTMLAttributes here? To ensure we stay consistent? Then we can need our "className" prop.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree! 😄

children: <div />,
};

describe('StudioRedirectBox', () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Ref. previous comment, then we can check that className is applied to root by using the test-utils for that. 😊

Copy link
Collaborator

@framitdavid framitdavid left a comment

Choose a reason for hiding this comment

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

Great work, I had some small stuff to look into 😊

@framitdavid framitdavid added team/studio-core skip-releasenotes Issues that do not make sense to list in our release notes labels Oct 25, 2024
@wrt95 wrt95 removed their assignment Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/process Area: Related to app process (e.g. signing, receipt, fill inn, payment, etc). area/ui-editor Area: Related to the designer tool for assembling app UI in Altinn Studio. frontend skip-releasenotes Issues that do not make sense to list in our release notes solution/studio/designer Issues related to the Altinn Studio Designer solution. team/studio-core
Projects
Status: 🔎 Review
Development

Successfully merging this pull request may close these issues.

Move RedirectBox to @studio/components
2 participants