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

feat: make panels resizable #623

Merged
merged 8 commits into from
Jun 1, 2023
Merged

feat: make panels resizable #623

merged 8 commits into from
Jun 1, 2023

Conversation

cazala
Copy link
Member

@cazala cazala commented Jun 1, 2023

Closes decentraland/sdk#763

In this PR I made all the panels resizable, moved the EntityInspector to a new panel on the right, and changed the styles of the Hierarchy and EntityInspector components to match the Assets footer styles (vscodish)

resize-panels.mp4

🤖 Generated by Copilot at b2e294d

This pull request improves the inspector UI by replacing the custom Resizable component with the react-resizable-panels library, updating the layout and styling of the inspector panels, and adding some hooks and attributes to enhance the functionality and integration of the inspector UI. It also adds some unit tests for the new useWindowSize hook, which returns the window size. It modifies several files in the packages/@dcl/inspector folder, such as package.json, package-lock.json, App.tsx, App.css, Assets.tsx, Assets.css, EntityInspector.tsx, EntityInspector.css, Hierarchy.tsx, Hierarchy.css, useWindowSize.ts, and useWindowSize.spec.ts. It also deletes the files related to the Resizable component, such as Resizable.tsx, Resizable.css, index.ts, and types.ts.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jun 1, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: bc74c7b
Status: ✅  Deploy successful!
Preview URL: https://ebdbd75a.js-sdk-toolchain.pages.dev
Branch Preview URL: https://feat-panels.js-sdk-toolchain.pages.dev

View logs

@cazala cazala marked this pull request as ready for review June 1, 2023 18:14
@github-actions
Copy link
Contributor

github-actions bot commented Jun 1, 2023

Test this pull request

  • The @dcl/sdk package can be tested in scenes by running

    npm install "https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/feat/panels/dcl-sdk-7.1.18-5148882657.commit-2d93312.tgz"
  • To test with npx init

    export SDK_COMMANDS="https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/feat/panels/dcl-sdk-commands-7.1.18-5148882657.commit-2d93312.tgz"
    npx $SDK_COMMANDS init
  • The @dcl/inspector package can be tested by visiting this url

    • Or by installing it via NPM
    npm install "https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/feat/panels/@dcl/inspector/dcl-inspector-7.1.18-5148882657.commit-2d93312.tgz"
  • The /changerealm command to test test in-world

    /changerealm https://sdk-team-cdn.decentraland.org/ipfs/feat/panels-e2e
    
  • You can preview this build entering:
    https://playground.decentraland.org/?sdk-branch=feat/panels

@codecov
Copy link

codecov bot commented Jun 1, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.39 🎉

Comparison is base (9d9918a) 72.84% compared to head (bc74c7b) 73.24%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #623      +/-   ##
==========================================
+ Coverage   72.84%   73.24%   +0.39%     
==========================================
  Files         267      266       -1     
  Lines        8816     8813       -3     
  Branches     1153     1155       +2     
==========================================
+ Hits         6422     6455      +33     
+ Misses       2277     2243      -34     
+ Partials      117      115       -2     
Impacted Files Coverage Δ
packages/@dcl/inspector/src/hooks/useWindowSize.ts 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@cazala cazala enabled auto-merge (squash) June 1, 2023 19:22
@cazala cazala disabled auto-merge June 1, 2023 20:08
@cazala cazala enabled auto-merge (squash) June 1, 2023 20:23
@cazala cazala merged commit b3b683f into main Jun 1, 2023
@cazala cazala deleted the feat/panels branch June 1, 2023 21:00
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.

Tweak panels' layout
2 participants