Skip to content

fix several issues with import files #1059

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

Merged
merged 5 commits into from
Feb 4, 2025
Merged

fix several issues with import files #1059

merged 5 commits into from
Feb 4, 2025

Conversation

nicoecheza
Copy link
Contributor

@nicoecheza nicoecheza commented Feb 4, 2025

Summary of Changes

1. Assets.css

  • Enhancements to Button Styles:
    • Added:
      • padding: 8px 9px;
      • font-weight: 600;
      • border-radius: 6px;
    • Increased stroke-width for the first button's SVG.

2. FileInput.tsx

  • Input Reset After File Selection:
    • Added a comment to clarify the purpose of resetting the input value.
    • Reset the input value to allow re-selection of the same file.

3. Error.tsx

  • Simplified Error Handling:
    • Used optional chaining for error type checking.
    • Updated rendering logic to display error messages only if an error exists.

4. utils.ts

  • Error Code Update:
    • Added a new error code:
      • 'VALUE_NOT_IN_RANGE'
  • Refactoring of getModel Function:
    • Added checks for URI existence to prevent potential errors.
  • Sequential Model Processing:
    • Changed model processing to run sequentially, replacing the previous Promise.all approach to avoid race conditions.

5. feeded-local-fs.ts

  • Path Update for GltfContainer:
    • Changed source path from:
      • assets/scene/models/example.glb
    • To:
      • assets/scene/Models/example/model.glb
  • Builder Mapping Update:
    • Updated the mapping to reflect the new model path.

These changes enhance the styling, error handling, and file processing logic, leading to improved functionality and maintainability.

Copy link

cloudflare-workers-and-pages bot commented Feb 4, 2025

Deploying js-sdk-toolchain with  Cloudflare Pages  Cloudflare Pages

Latest commit: 42486cd
Status: ✅  Deploy successful!
Preview URL: https://8db27779.js-sdk-toolchain.pages.dev
Branch Preview URL: https://fix-several.js-sdk-toolchain.pages.dev

View logs

Copy link
Contributor

github-actions bot commented Feb 4, 2025

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/fix/several/dcl-sdk-7.7.3-13140469606.commit-54b9794.tgz"
  • To test with npx init

    export SDK_COMMANDS="https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/fix/several/dcl-sdk-commands-7.7.3-13140469606.commit-54b9794.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/fix/several/@dcl/inspector/dcl-inspector-7.7.3-13140469606.commit-54b9794.tgz"
  • The /changerealm command to test test in-world

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

@nicoecheza nicoecheza changed the title fix race condition when validating models on import fix several issues with import files Feb 4, 2025
@nicoecheza nicoecheza enabled auto-merge (squash) February 4, 2025 17:00
@nicoecheza nicoecheza merged commit 551d432 into main Feb 4, 2025
8 checks passed
@nicoecheza nicoecheza deleted the fix/several branch February 4, 2025 20:02
gonpombo8 added a commit that referenced this pull request Mar 27, 2025
* chore: update readmes (#1054)

* chore: update readmes

* Update packages/@dcl/ecs/README.md

Co-authored-by: Gon Pombo <[email protected]>
Signed-off-by: Juan Cazala <[email protected]>

---------

Signed-off-by: Juan Cazala <[email protected]>
Co-authored-by: Gon Pombo <[email protected]>

* add filters for asset explorer (#1056)

* add filters for asset explorer

* use decentraland/oddish-action

* move 'Filter' to enum

* move IAsset type determination to fn

* fix several issues with import files (#1059)

* fix race condition when validating models on import

* add 'VALUE_NOT_IN_RANGE' to ignored model errors

* fix import button on asset explorer styles

* move feeded fs example model to Models/example/model.glb

* reset the FileInput value so the same file can be selected again

* fix import file size + extension validation (#1060)

* change max file import size to 50mb

* allow all extensions on FileInput to show errors on Error modal

* fix: Load smart item asset path (#1062)

* fix: Load smart items path

* fix: Add a small retry when fetching the models to avoid race conditions

* fix: Linter

* fix: handle new categories without breaking (#1058)

* fix Animator component initialization (#1061)

* fix network entities for the editor (#1069)

* fix network entities for the editor

* fix tests & lint

* fix tests

* feat: Make createReactBasedUiSystem public (#1063)

* feat: Make createReactBasedUiSystem public

* fix: playground-assets.api.md

* feat: Send PlayersHelpers to the initAssetPacks method

* feat: Update BasicView Actions to handle TextArea fields (#1064)

* Fix/dropdown input result callbacks (#1071)

* fix uiDropdown not being updated

* fix tests

* fix test COVERAGE

* remove unnecessary return

* wip test

* move 'spawn' ts checker to 'fork' (#1074)

* fix several issues (#1072)

* fix scroll on assets catalog

* fix tooltip link on Action & Trigger components

* deprecate alphaTexture on PBR & add it to unlit materials

* replace 'ctrl' for '⌘' on shortcuts when necessary

* add 'global' prop to AudioSource

* feat: avatarTarget param addition in movePlayerTo() (#1073)

* feat: Add AdminTools Smart Item (#1066)

* WIP

* feat: Export components Accordion and CheckboxGroup

* fix: Update type of AddButton

* feat: Add AdminTools Rewards Control Inspector

* feat: Add AdminTools Video Control Inspector

* feat: Add AdminTools Smart Items Control Inspector

* feat: Remove unused code

* chore: Use dev @dcl/asset-packs package

* chore: Update dependencies

* wip

* wip

* fix: Config

* chore: Update @dcl/asset-packs dependency

* feat: Update Pill padding styles

* feat: Update VideoControl styles

* feat: Move TextAnnouncementControl section to a new component

* feat: Update SmartItemControl styles

* feat: Update RewardsControl styles

* feat: Move AdminAllowListControl section to a new component

* feat: Refactor AdminToolkitView

* chore: Update @dcl/asset-packs version

* feat: Add border styles to the Accordion component

* fix: AdminTools styles

* refactor: RewardInspector component form to a new component

* feat: Add RewardsBasicView component for Collectible Dispenser

* feat: Add AdminToolsBasicView for AdminTools

* fix: lint

* fix: Rewards component visibility

* feat: Add InfoTooltip for the AdminTools view

* eat: Add InfoTooltip for the Rewards view

* fix: Typo in Admin Text announcements control

* fix: Prioritize Video Control over Text Announcements

* fix: Rewards URL env

* chore: Update @dcl/asset-packs version

* chore: Update @dcl/asset-packs version

* fix: Lint

* feat: Add  parentEntity, removeParent, getParent, getChildren methods to the initAssetPacks init

* fix: Update asset-packs

* fix: Bundle

* fix: Update asset-packs

* fix: Update asset-packs

* fix: Update asset-packs

* fix: Update asset-packs

* fix: Remove link all screens and show author checkboxes

* fix: Remove link all smart items handler

* fix: Remove Airdrops section

* fix: Show action Claim Airdrop only when the entity has the Rewards component

* fix: Update asset-packs

* fix: Update asset-packs

* fix: Doesn't allow add rows

* fix: AvailableActions Map

* fox: Remove validation for dev

* update asset-packs

---------

Co-authored-by: Gonzalo DCL <[email protected]>

* bump asset-packs 2.2.1 (#1077)

* update left/right click button behaviour on renderer (#1078)

* update left/right click button behaviour on renderer

* remove gizmo right click button

* fixed review comments

* remove desktop client (OLD) option (#1083)

* select "Scene" in tree on startup (#1082)

* update left/right click button behaviour on renderer

* select 'Scene' in tree on startup

* add refresh button for Assets (#1085)

* support border in uitransforms (#1084)

* support border in uitransforms

* fix build

* change protocol to experimental

* use main protocol

* fix snapshots test

* fix tests

* fix coverage

* update protocol

---------

Signed-off-by: Juan Cazala <[email protected]>
Co-authored-by: Juan Cazala <[email protected]>
Co-authored-by: Nicolas Echezarreta <[email protected]>
Co-authored-by: Gabriel Díaz <[email protected]>
Co-authored-by: Pravus <[email protected]>
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.

2 participants