Fix environment browser preview image URLs - #7849
Conversation
There was a problem hiding this comment.
Isaac Lab Review Bot
The change centralizes environment-browser preview URL resolution so task images use the external image host while non-task images, including Lift-Soft-Franka, remain under the documentation build’s local _static path.
- Design and architecture: Using one resolver for both selected-task previews and task-card thumbnails removes the previous divergence between their producer paths. Routing by the existing
tasks/prefix is consistent with the current image mapping table, though it remains an implicit convention future mappings must preserve. - API: No public package APIs, CLI options, or exported symbols change. Both consumers retain the existing task-object input convention, and the documentation-only asset fix does not require a package changelog fragment or deprecation path.
- Implementation: The external branch correctly preserves paths such as
tasks/classic/cartpole.jpgbeneath the configured image host, while the local branch preserves non-task mappings beneath../../_static/. Both changed consumers now use the same resolver, and no broken image-path consumer is evident from the supplied context.
No blocking issues. No inline issue met the actionable-evidence threshold; the assessment above records the review feedback.
Automated review; human maintainers own approval decisions.
|
| const imagePath = previewImageFor(task); | ||
| return imagePath.startsWith("tasks/") | ||
| ? new URL(imagePath, previewImageBaseUrl).href | ||
| : new URL(`../../_static/${imagePath}`, window.location.href).href; |
There was a problem hiding this comment.
On the deployed multi-version site, this page is served from <version>/setup/environments.html. Resolving ../../_static/${imagePath} removes the version segment and requests the image from the site-root _static directory, while static assets are published inside each version directory. Non-task previews such as Lift-Soft-Franka will therefore return 404; resolve the path relative to the current version root instead.
| : new URL(`../../_static/${imagePath}`, window.location.href).href; | |
| : new URL(`../_static/${imagePath}`, window.location.href).href; |
|
run-ci |
(cherry picked from commit 50ea058) #7849 # Description > [!IMPORTANT] > Confirm the pull request base before submitting. Target `develop` for all > contributions. The `release/3.0.0-beta2` branch is a frozen stable landing > snapshot and is not used for ongoing maintenance. <!-- Thank you for your interest in sending a pull request. Please make sure to check the contribution guidelines. Link: https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html 💡 Please try to keep PRs small and focused. Large PRs are harder to review and merge. --> Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. Fixes # (issue) <!-- As a practice, it is recommended to open an issue to have discussions on the proposed pull request. This makes it easier for the community to keep track of what is being developed or added, and if a given feature is demanded by more than one party. --> ## Type of change <!-- As you go through the list, delete the ones that are not applicable. --> - Bug fix (non-breaking change which fixes an issue) - New feature (non-breaking change which adds functionality) - Breaking change (existing functionality will not work without user modification) - Documentation update ## Release backport - [ ] <!-- backport-active-release --> Backport this pull request to the active release branch after it merges into `develop` ## Screenshots Please attach before and after screenshots of the change if applicable. <!-- Example: | Before | After | | ------ | ----- | | _gif/png before_ | _gif/png after_ | To upload images to a PR -- simply drag and drop an image while in edit mode and it should upload the image directly. You can then paste that source into the above before/after sections. --> ## Checklist Docker and GPU tests run on demand. Push the commits you want tested, then comment `run-ci` on the pull request. - [ ] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [ ] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have added a changelog fragment under `source/<pkg>/changelog.d/` for every touched package (do **not** edit `CHANGELOG.rst` or bump `extension.toml` — CI handles that) - [ ] I have added my name to the `CONTRIBUTORS.md` or my name already exists there <!-- As you go through the checklist above, you can mark something as done by putting an x character in it For example, - [x] I have done this task - [ ] I have not done this task --> Co-authored-by: Mustafa Haiderbhai <mhaiderbhai@nvidia.com>
Description
Follow-up to #7822 that addresses the two review comments left on the merged PR:
_static/tasksassets; andLift-Soft-Franka, on their local_staticpaths.Both the selected-task preview and task-card thumbnails now use one shared URL resolver.
Addresses:
Type of change
Release backport
developValidation
node --check docs/source/_static/css/environment-browser.jsuv run --extra test python -m pytest --noconftest tools/test/test_environ_docs.py(35 passed)uv run --isolated --extra dev -- make -C docs current-docs(succeeded without warnings)Lift-Soft-Frankaresolves to the local built_static/newtonimage.uv run isaaclab -f(all applicable hooks passed; changelog validation passed separately againstupstream/developbecause the fork base is stale)Checklist
CONTRIBUTORS.md