Skip to content

Conversation

Inbal-Tish
Copy link
Collaborator

Description

LivePreview - fix UI

Changelog

LivePreview - fix UI

Additional info

@Inbal-Tish Inbal-Tish requested a review from Copilot March 31, 2025 11:23
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the UI for LivePreview by renaming a component and refining how the SectionHeader component renders its usage title.

  • Renames the default function in livePreview.tsx from UILivePreview to LivePreviewWrapper.
  • Updates SectionHeader.tsx to dynamically display either "Playground" or "Usage" based on component support.

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
docuilib/src/pages/livePreview.tsx Renamed the default export to LivePreviewWrapper.
docuilib/src/components/pageComponents/SectionHeader.tsx Added logic using isComponentSupported to choose the usage title and reordered stylesheet import.
Files not reviewed (1)
  • docuilib/src/components/UILivePreview.module.scss: Language not supported
Comments suppressed due to low confidence (2)

docuilib/src/pages/livePreview.tsx:7

  • [nitpick] The function name 'LivePreviewWrapper' might not clearly convey its role compared to the file name 'livePreview.tsx'. Consider renaming it to better align with the file's context.
export default function LivePreviewWrapper() {

docuilib/src/components/pageComponents/SectionHeader.tsx:31

  • [nitpick] The local variable 'title' in getUsageTitle may cause confusion by shadowing the 'title' property from 'section'. Consider renaming it to 'usageTitle' for clarity.
const title = isComponentSupported(component.name) ? 'Playground' : 'Usage';

@ethanshar ethanshar assigned Inbal-Tish and unassigned ethanshar Apr 3, 2025
@Inbal-Tish Inbal-Tish assigned ethanshar and unassigned Inbal-Tish Apr 6, 2025
@ethanshar ethanshar merged commit 333d7d2 into master Apr 6, 2025
1 check passed
@ethanshar ethanshar deleted the docs/LivePreview_UI_fix branch April 6, 2025 11:16
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