elements
elements copied to clipboard
fix: allow to display the code samples when try it panel is hidden
Changes
- Modified the rendering logic of the TryIt component to ensure it generates request data regardless of the TryIt panel's visibility.
- Ensured that the request sample is consistently displayed on the page by decoupling the request data generation from the TryIt panel's display state.
Rationale
Previously, the request sample could not be displayed without rendering the TryIt panel, which was a limitation. This change allows the request sample by not visually rendering the TryIt Panel when its opted out off.
Testing
- Verified that the request sample is correctly displayed when the TryIt panel is hidden.
- Ensured no regressions in the display of the TryIt panel and its functionality.
Elements Default PR Template
In general, make sure you have: (check the boxes to acknowledge you've followed this template)
- [X] Read
CONTRIBUTING.md
Other Available PR Templates:
- Release: https://github.com/stoplightio/elements/compare?template=release.md
- [ ] Read the release section of
CONTRIBUTING.md
- [ ] Read the release section of
Deploy Preview for stoplight-elements ready!
| Name | Link |
|---|---|
| Latest commit | 6e89828631553a4f0d0d261326804e8c49926d23 |
| Latest deploy log | https://app.netlify.com/sites/stoplight-elements/deploys/672a09e3534c5d00085543a7 |
| Deploy Preview | https://deploy-preview-2624--stoplight-elements.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Deploy Preview for stoplight-elements-demo ready!
| Name | Link |
|---|---|
| Latest commit | 6e89828631553a4f0d0d261326804e8c49926d23 |
| Latest deploy log | https://app.netlify.com/sites/stoplight-elements-demo/deploys/672a09e32c8e7800083b478d |
| Deploy Preview | https://deploy-preview-2624--stoplight-elements-demo.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
LGTM!
@weyert Can we also update the docs please
Yeah, I will do. Probably tomorrow.
Totally forgot about it @mnaumanali94 I have added the call out in the documentation now.