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(Overview): onlyOverview - External Compositions and API Reference #7504

Merged
merged 99 commits into from
Jan 1, 2024

Conversation

luvkapur
Copy link
Member

@luvkapur luvkapur commented Jun 6, 2023

This PR introduces a new onlyOverview preview option, enhancing the Overview section with a dedicated API Reference subsection and useNameParam preview option.

Key Features:

onlyOverview Preview Option:

Enabled via the preview data of a component's environment, this feature is automatically activated for all components tagged with this Bit version onwards.
It refines the Overview screen to render only the main documentation and examples within the iframe, while client-side mounting the Compositions Carousel along with the new API Reference subsection.

The new UI is under a feature flag at the moment.
To apply it you need to set this in your workspace.jsonc

"teambit.preview/preview": {
  "onlyOverview": true
}

API Reference Subsection:

This update replaces the previous properties table, which was limited to displaying props for React components only.
The new API Reference table leverages our internal Schema Extractor (also powering the API Reference tab) to highlight the relevant APIs for your component, utilizing the @exports jsdoc tag.
By default, it presents an API Table of Contents, collating all exported APIs from the component's main file and linking them to their detailed information in the API Reference Tab.

useNameParam Preview Option:

Enabled via the preview data of a component's environment, this feature is automatically activated for all components tagged with this Bit version onwards.
It sets the selected composition via name url param to view selected compositions, previously this was set with a combination of two preview options (includesEnvTemplate and doesScaling)

Compositions Order Bug Fix:

This PR also fixes the bug where the compositions were incorrectly ordered. Now all compositions are ordered according to the order they are defined.

Loading Overview Docs Iframe:

This PR also adds a skeleton loading spinner while the docs iframe loads

fixes #7332

@luvkapur luvkapur changed the title fix(Preview): remove compositions from overview fix(preview): remove compositions from overview in the iframe Jun 6, 2023
@luvkapur luvkapur requested a review from GiladShoham June 7, 2023 18:15
@luvkapur luvkapur marked this pull request as draft September 20, 2023 21:45
@luvkapur luvkapur changed the title fix(preview): remove compositions from overview in the iframe feat(Overview): API Reference Properties Table and mount Compositions from outside of the iframe Sep 20, 2023
@luvkapur luvkapur enabled auto-merge (squash) October 30, 2023 23:05
@luvkapur luvkapur linked an issue Nov 20, 2023 that may be closed by this pull request
@GiladShoham GiladShoham merged commit adee103 into master Jan 1, 2024
11 checks passed
@GiladShoham GiladShoham deleted the preview/fix-comp-order branch January 1, 2024 10:44
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.

Properties created in the component are shown as "signature"
3 participants