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

fix: empty scene div causing dom flow to change if neither conditions are met #29109

Closed
wants to merge 2 commits into from

Conversation

adamleithp
Copy link
Contributor

Problem

image

Changes

Hide the wrapping div if neither of the conditions are met.

Does this work well for both Cloud and self-hosted?

Should

How did you test this code?

Locally... which is difficult because locally we get the This is a demo project with dummy data. project notice.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

Fixed an empty div rendering issue in the Navigation component and updated styling for input components to improve consistency and accessibility.

  • Modified /frontend/src/layout/navigation-3000/Navigation.tsx to only render notice container div when notices are present
  • Updated /frontend/src/lib/lemon-ui/LemonSwitch/LemonSwitch.scss to use --bg-fill-muted for better contrast
  • Changed /frontend/src/lib/lemon-ui/LemonCheckbox/LemonCheckbox.scss to use standardized input styling variables
  • Added /frontend/src/lib/ui/Inputs.stories.tsx to showcase input components in Storybook with different backgrounds

7 file(s) reviewed, 4 comment(s)
Edit PR Review Bot Settings | Greptile

{!sceneConfig?.hideProjectNotice && <ProjectNotice />}
</div>
{(!sceneConfig?.hideBillingNotice || !sceneConfig?.hideProjectNotice) && (
<div className={sceneConfig?.layout === 'app-raw-no-header' ? 'px-4' : ''}>
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Consider using Tailwind's conditional classes with clsx here instead of ternary operator for consistency with other className assignments in the file

Comment on lines +22 to +23
<LemonInput disabled />
<LemonInput disabled />
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: Duplicate disabled LemonInput component with identical props

Suggested change
<LemonInput disabled />
<LemonInput disabled />
<LemonInput disabled />

<LemonInput disabled />
<LemonInput disabled />
<LemonInput value={"I'm pre-filled"} />
<LemonSlider max={100} min={0} value={50} />
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: LemonSlider lacks onChange handler, making it non-interactive in Storybook

}
export default meta

function GetAllInputs(): JSX.Element {
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Function name 'GetAllInputs' does not follow camelCase convention used elsewhere in codebase

@adamleithp adamleithp force-pushed the devex/fix-empty-scene-div branch from 6ed961f to 02b760a Compare February 23, 2025 00:13
@adamleithp adamleithp closed this Feb 23, 2025
@adamleithp adamleithp deleted the devex/fix-empty-scene-div branch February 23, 2025 00:13
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.

1 participant