Skip to content

Comments

refactor: packing input#58

Merged
rugeli merged 5 commits intomainfrom
feature/packing-input-refactor
Aug 11, 2025
Merged

refactor: packing input#58
rugeli merged 5 commits intomainfrom
feature/packing-input-refactor

Conversation

@rugeli
Copy link
Contributor

@rugeli rugeli commented Aug 7, 2025

Problem

What is the problem this work solves, including
closes #54

Solution

What I/we did to solve this problem

  • created Dropdown and JSONViewer components and their stylesheets
  • cleaned up and reorganized app.css:
    • removed unused styles
    • moved relevant styles into their corresponding component stylesheets to keep styles self-contained and maintain only global styles in app.css

Type of change

Please delete options that are not relevant.

  • Refactor (non-breaking change which fixes an issue)

Steps to Verify:

  1. Refer to preview
  2. This pr shouldn't affect existing functionality

@github-actions
Copy link

github-actions bot commented Aug 7, 2025

PR Preview Action v1.6.2
Preview removed because the pull request was closed.
2025-08-11 19:11 UTC

Comment on lines +1 to +4
.collapsible {
width: 450px;
margin-top: 5%;
}
Copy link
Contributor Author

@rugeli rugeli Aug 7, 2025

Choose a reason for hiding this comment

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

it's not so great that I added .collapsible into two stylesheets for button, but I personally think it's fine for now because the design is not yet finalized and in this pr our focus is on components and style isolation. We'll likely want to have a shared button component with its own stylesheet to consolidate moving forward.

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree, making a button component is definitely in our future, so having this duplicate .collapsible code is temporary, and I don't think we need to bother worrying about it right now

@rugeli rugeli requested a review from ascibisz August 7, 2025 20:22
@rugeli
Copy link
Contributor Author

rugeli commented Aug 7, 2025

Looking through the files, I feel there's room to further refactor some hooks out of PackingInput, I'll make another ticket and we can discuss next time to decide whether it makes sense to extract them.

{placeholder}
</option>
{Object.entries(options).map(([key, value]) => (
<option key={key} value={value["firebaseId"]}>
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: maybe we should make the "firebaseId" string a constant somewhere? I imagine we're intentionally setting this somewhere else. Obviously I know you just moved this code, you didn't write it in this PR, but I just noticed it

@rugeli rugeli merged commit 844770f into main Aug 11, 2025
1 check passed
@rugeli rugeli deleted the feature/packing-input-refactor branch August 11, 2025 19:11
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.

Break <PackingInput /> into multiple components

2 participants