Skip to content

Commit

Permalink
Fixes bugs with the story viewer
Browse files Browse the repository at this point in the history
  • Loading branch information
josh-signal committed May 4, 2022
1 parent 36c5de4 commit c6c6087
Show file tree
Hide file tree
Showing 5 changed files with 155 additions and 155 deletions.
1 change: 1 addition & 0 deletions images/icons/v2/arrow-left-32.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions images/icons/v2/arrow-right-32.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 11 additions & 12 deletions stylesheets/components/StoryViewer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@
&__container {
flex-grow: 1;
overflow: hidden;
position: relative;
z-index: $z-index-base;
}

&__story {
Expand All @@ -74,7 +72,7 @@
transform: translateX(-50%);
min-width: 284px;
width: 56.25vh;
z-index: $z-index-above-base;
z-index: $z-index-above-above-base;

&--group-avatar {
margin-left: -8px;
Expand Down Expand Up @@ -156,14 +154,16 @@
}

&__arrow {
@include button-reset;
align-items: center;
display: flex;
height: 100vh;
position: absolute;
width: 25%;
z-index: $z-index-above-above-base;

button {
@include button-reset;
&::before {
content: '';
height: 24px;
opacity: 0;
width: 24px;
Expand All @@ -174,10 +174,10 @@
justify-content: flex-start;
left: 0;

button {
&::before {
margin-left: 24px;
@include color-svg(
'../images/icons/v2/chevron-left-24.svg',
'../images/icons/v2/arrow-left-32.svg',
$color-white
);
}
Expand All @@ -187,25 +187,24 @@
justify-content: flex-end;
right: 0;

button {
&::before {
margin-right: 24px;
@include color-svg(
'../images/icons/v2/chevron-right-24.svg',
'../images/icons/v2/arrow-right-32.svg',
$color-white
);
}
}

&--visible button {
&--visible::before {
opacity: 1;
visibility: visible;
}
}

&__protection {
position: absolute;
width: 100%;
z-index: $z-index-above-base;
z-index: $z-index-base;

&--top {
background: linear-gradient($color-black-alpha-16, $color-transparent);
Expand Down
5 changes: 5 additions & 0 deletions ts/components/StoryViewer.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ function getDefaultProps(): PropsType {
path: 'snow.jpg',
url: '/fixtures/snow.jpg',
}),
canReply: true,
messageId: '123',
sender,
timestamp: Date.now(),
Expand All @@ -64,6 +65,7 @@ story.add('Wide story', () => (
path: 'file.jpg',
url: '/fixtures/nathan-anderson-316188-unsplash.jpg',
}),
canReply: true,
messageId: '123',
sender: getDefaultConversation(),
timestamp: Date.now(),
Expand Down Expand Up @@ -103,6 +105,7 @@ story.add('Multi story', () => {
path: 'file.jpg',
url: '/fixtures/nathan-anderson-316188-unsplash.jpg',
}),
canReply: true,
messageId: '456',
sender,
timestamp: Date.now() - 3600,
Expand All @@ -122,6 +125,7 @@ story.add('Caption', () => (
path: 'file.jpg',
url: '/fixtures/nathan-anderson-316188-unsplash.jpg',
}),
canReply: true,
messageId: '123',
sender: getDefaultConversation(),
timestamp: Date.now(),
Expand All @@ -141,6 +145,7 @@ story.add('Long Caption', () => (
path: 'file.jpg',
url: '/fixtures/snow.jpg',
}),
canReply: true,
messageId: '123',
sender: getDefaultConversation(),
timestamp: Date.now(),
Expand Down

0 comments on commit c6c6087

Please sign in to comment.