Skip to content

Commit af5dbc6

Browse files
Merge pull request #154 from StackOverflowIsBetterThanAnyAI/149-add-shadow-to-hero-section
add shadows, fix navigation expanding when filtering
2 parents 664326f + d66e8b4 commit af5dbc6

File tree

6 files changed

+23
-13
lines changed

6 files changed

+23
-13
lines changed

cypress/e2e/navigation_large_screen.cy.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ describe('twitch-app contains navigation bar for large screen sizes', () => {
1616
it('displays the whole navigation bar content for large screen sizes', () => {
1717
cy.get('[data-testid="navigation"]').should('have.length', 1)
1818

19-
cy.get('[data-testid="navigation"]').children().should('have.length', 3)
19+
cy.get('[data-testid="navigation"]').children().should('have.length', 1)
20+
21+
cy.get('[data-testid="navigation"]')
22+
.children()
23+
.children()
24+
.should('have.length', 3)
2025
})
2126

2227
it('displays the homepage button for large screen sizes', () => {

cypress/e2e/navigation_small_screen.cy.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@ describe('twitch-app contains navigation bar for small screen sizes', () => {
1717
it('displays the whole navigation bar content for small screen sizes', () => {
1818
cy.get('[data-testid="navigation"]').should('have.length', 1)
1919

20-
cy.get('[data-testid="navigation"]').children().should('have.length', 3)
20+
cy.get('[data-testid="navigation"]').children().should('have.length', 1)
21+
22+
cy.get('[data-testid="navigation"]')
23+
.children()
24+
.children()
25+
.should('have.length', 3)
2126
})
2227

2328
it('displays the homepage button for small screen sizes', () => {

src/components/UI/navigation/Navigation.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,11 +342,11 @@ const Navigation = () => {
342342
return (
343343
<div className="sticky top-0 z-10" data-testid="navigation-container">
344344
<nav
345-
className={`bg-zinc-925 text-slate-300 py-2 px-4 h-16
345+
className={`bg-zinc-925 text-slate-300
346346
transition-opacity duration-500 ease-in-out ${navOpacity}`}
347347
data-testid="navigation"
348348
>
349-
<div className="max-w-[2048px] flex justify-between w-full m-auto">
349+
<div className="max-w-[2048px] flex justify-between w-full py-2 px-4 h-16 m-auto">
350350
<HomeIcon />
351351
{contextScreenWidth === 'TABLET' ||
352352
contextScreenWidth === 'DESKTOP' ? (

src/components/UI/navigation/SearchResultSuggestion.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const SearchResultSuggestion = forwardRef<
4141

4242
return (
4343
<div
44-
className="outline outline-zinc-700 rounded-lg bg-zinc-900 flex flex-col overflow-auto"
44+
className="outline outline-zinc-700 shadow-zinc-900 shadow-xl rounded-lg bg-zinc-900 flex flex-col overflow-auto"
4545
style={{
4646
maxHeight: '377px',
4747
minHeight: `clamp(0px, ${

src/components/streamFeed/StreamHero.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ const StreamHero = ({ bgColors, filteredStreamData }: StreamHeroProps) => {
3434
{contextScreenWidth === 'DESKTOP' ? (
3535
<article
3636
className="flex w-4/5 max-w-6xl m-auto p-4 my-4 items-center gap-4
37-
bg-gradient-to-b from-zinc-700 to-zinc-700/80 rounded-lg"
37+
bg-gradient-to-b from-zinc-700 to-zinc-700/80 shadow-zinc-900 shadow-lg rounded-lg"
3838
data-testid="streamfeed-article-0"
3939
>
4040
<div className={`w-1/2 ${bgColors[0]} aspect-video`}>
4141
<StreamPlayer
4242
channel={filteredStreamData.data[0].user_login}
4343
/>
4444
</div>
45-
<section className="flex items-center gap-x-2 w-1/2 bg-zinc-800 p-4 rounded-xl">
45+
<section className="flex items-center gap-x-2 w-1/2 bg-zinc-800 shadow-zinc-800/75 shadow-md p-4 rounded-xl">
4646
<StreamProfilePicture
4747
isHeroPicture
4848
user_id={filteredStreamData.data[0].user_id}
@@ -79,7 +79,7 @@ const StreamHero = ({ bgColors, filteredStreamData }: StreamHeroProps) => {
7979
) : contextScreenWidth === 'TABLET' ? (
8080
<article
8181
className="flex flex-col w-full m-auto p-4 my-4 gap-2
82-
bg-gradient-to-b from-zinc-700 to-zinc-700/80 rounded-lg"
82+
bg-gradient-to-b from-zinc-700 to-zinc-700/80 shadow-zinc-900 shadow-lg rounded-lg"
8383
data-testid="streamfeed-article-0"
8484
>
8585
<div className="flex items-center gap-4">
@@ -88,7 +88,7 @@ const StreamHero = ({ bgColors, filteredStreamData }: StreamHeroProps) => {
8888
channel={filteredStreamData.data[0].user_login}
8989
/>
9090
</div>
91-
<section className="flex items-center gap-x-2 w-1/2 bg-zinc-800 p-4 rounded-xl">
91+
<section className="flex items-center gap-x-2 w-1/2 bg-zinc-800 shadow-zinc-800/75 shadow-md p-4 rounded-xl">
9292
<StreamProfilePicture
9393
isHeroPicture
9494
user_id={filteredStreamData.data[0].user_id}
@@ -127,16 +127,16 @@ const StreamHero = ({ bgColors, filteredStreamData }: StreamHeroProps) => {
127127
</article>
128128
) : (
129129
<article
130-
className="flex flex-col m-auto p-4 my-4 gap-2
131-
bg-gradient-to-b from-zinc-700 to-zinc-700/80 rounded-lg"
130+
className="flex flex-col m-auto p-4 my-4 gap-4
131+
bg-gradient-to-b from-zinc-700 to-zinc-700/80 shadow-zinc-900 shadow-lg rounded-lg"
132132
data-testid="streamfeed-article-0"
133133
>
134134
<div className={`w-full ${bgColors[0]} aspect-video`}>
135135
<StreamPlayer
136136
channel={filteredStreamData.data[0].user_login}
137137
/>
138138
</div>
139-
<section className="flex items-center gap-x-2 bg-zinc-800 p-4 rounded-xl">
139+
<section className="flex items-center gap-x-2 bg-zinc-800 shadow-zinc-800/75 shadow-md p-4 rounded-xl">
140140
<StreamProfilePicture
141141
isHeroPicture
142142
user_id={filteredStreamData.data[0].user_id}

src/components/streamFeed/StreamPlayer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ const StreamPlayer: React.FC<StreamPlayerProps> = ({ channel }) => {
6464
}
6565
}, [height])
6666

67-
return <div ref={containerRef}></div>
67+
return <div ref={containerRef} className="shadow-zinc-900 shadow-lg"></div>
6868
}
6969

7070
export default StreamPlayer

0 commit comments

Comments
 (0)