Skip to content

Banner overflow #49

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

Merged
merged 5 commits into from
Jun 24, 2025
Merged

Banner overflow #49

merged 5 commits into from
Jun 24, 2025

Conversation

debs-obrien
Copy link
Owner

This pull request introduces a variety of changes to improve the UI/UX and code organization of the movies-app project. Key updates include adding a demo banner for testing purposes, refining the layout and styles of several components, and removing unused code. Below is a summary of the most important changes grouped by theme:

New Features

  • Added a DemoBanner component to display a fixed banner at the top of the application for demo purposes. This replaces the inline banner previously defined in _document.js. (movies-app/components/DemoBanner/index.js, movies-app/pages/_document.js, movies-app/parts/Layout/index.js) [1] [2] [3]

Layout and Styling Improvements

  • Adjusted the AppBar component to account for the new demo banner by modifying its position and reducing the toolbar height across different screen sizes. (movies-app/components/UI/AppBar/index.js) [1] [2] [3]
  • Updated the ContentWrapper padding to accommodate the demo banner and improve spacing consistency. (movies-app/parts/Layout/ContentWrapper/index.js)
  • Enhanced the BurgerHeader and Layout components by adding a logo to the header and adjusting their layouts for better alignment and spacing. (movies-app/containers/AppHeader/BurgerHeader/index.js, movies-app/parts/Layout/index.js) [1] [2] [3]

Code Cleanup and Refactoring

  • Removed unused Logo import and isMobile prop from the Menu component to simplify the code. (movies-app/components/Menu/index.js) [1] [2] [3]
  • Removed an unnecessary import statement in Layout to clean up the file. (movies-app/parts/Layout/index.js)

Minor UI Adjustments

  • Adjusted padding and dimensions for the Form in the SearchBar component to improve its appearance. (movies-app/containers/SearchBar/Form/index.js)
  • Reduced the width of the MagnifierButton's SearchIcon for better alignment. (movies-app/containers/SearchBar/MagnifierButton/index.js)
  • Updated margins and spacing for headings in SectionHeading and SummarySectionHeading components. (movies-app/components/Menu/SectionHeading/index.js, movies-app/parts/SummarySectionHeading/index.js) [1] [2]

Sidebar Enhancements

  • Wrapped the Sidebar in a new container to improve layout flexibility and added padding to the menu container for better spacing. (movies-app/containers/Sidebar/index.js, movies-app/containers/Sidebar/SidebarInnerWrapper/index.js) [1] [2]

@debs-obrien debs-obrien requested a review from Copilot June 24, 2025 19:03
Copy link
Contributor

@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 introduces a new DemoBanner component, refines various layouts to accommodate the banner and logos, and cleans up unused code across the project.

  • Added a reusable DemoBanner component and removed the inline banner in _document.js
  • Updated Layout, AppBar, BurgerHeader, and ContentWrapper to adjust for banner space and injected logos
  • Cleaned up unused imports/props and tweaked UI components for consistent spacing

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
movies-app/parts/SummarySectionHeading/index.js Updated top/bottom margins on summary headings
movies-app/parts/Layout/index.js Integrated DemoBanner, added header logo
movies-app/parts/Layout/ContentWrapper/index.js Increased top padding for content area
movies-app/pages/_document.js Removed hardcoded inline banner HTML/CSS
movies-app/containers/Sidebar/index.js Wrapped sidebar; added menu-container padding
movies-app/containers/Sidebar/SidebarInnerWrapper/index.js Converted margin-top to padding-top
movies-app/containers/SearchBar/MagnifierButton/index.js Adjusted search icon width to 1em
movies-app/containers/SearchBar/Form/index.js Tweaked form padding/height for consistency
movies-app/containers/AppHeader/BurgerHeader/index.js Added mobile header logo and accompanying styles
movies-app/components/UI/AppBar/index.js Updated positioning and toolbar heights
movies-app/components/Menu/index.js Removed unused Logo import and isMobile
movies-app/components/Menu/SectionHeading/index.js Added top padding and position: relative
movies-app/components/DemoBanner/index.js Created new DemoBanner component
Comments suppressed due to low confidence (2)

movies-app/components/DemoBanner/index.js:3

  • [nitpick] No tests were added for the new DemoBanner component. Consider adding unit or snapshot tests to verify its appearance and behavior.
const DemoBanner = () => (

movies-app/parts/Layout/index.js:113

  • The DemoBanner component is rendered twice in the layout (lines 34 and 113). Remove the duplicate instance to avoid showing two banners.
      <DemoBanner />

Comment on lines +25 to +32
padding-top: 100px;
padding-bottom: 6rem;
}
}

@media ${theme.mediaQueries.large} {
.content-wrapper {
padding-top: 72px;
padding-top: 100px;
Copy link
Preview

Copilot AI Jun 24, 2025

Choose a reason for hiding this comment

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

[nitpick] This padding-top value is duplicated in two media queries. Extract the value into a constant or shared style to reduce duplication and ease future adjustments.

Copilot uses AI. Check for mistakes.

Comment on lines +54 to +61
<div className='logo-container'>
<img
className='logo-img'
width='56'
height='56'
src={LOGO_IMAGE_PATH}
alt='movie ticket' />
</div>
Copy link
Preview

Copilot AI Jun 24, 2025

Choose a reason for hiding this comment

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

[nitpick] The logo-container and logo-img styles are duplicated in both Layout and BurgerHeader. Consider abstracting this logo block into a shared component or CSS module to avoid repetition.

Suggested change
<div className='logo-container'>
<img
className='logo-img'
width='56'
height='56'
src={LOGO_IMAGE_PATH}
alt='movie ticket' />
</div>
<LogoBlock />

Copilot uses AI. Check for mistakes.

<HamburgerButton onClick={openMenu} />
<div className='left-section'>
<HamburgerButton onClick={openMenu} />
<div className='logo-container'>
Copy link
Preview

Copilot AI Jun 24, 2025

Choose a reason for hiding this comment

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

[nitpick] Same logo-container/logo-img duplication here. Extract into a reusable component or shared styles to keep the code DRY.

Copilot uses AI. Check for mistakes.

@debs-obrien debs-obrien merged commit 4e16e35 into main Jun 24, 2025
1 check passed
@debs-obrien debs-obrien deleted the banner-overflow branch June 24, 2025 19:11
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