Skip to content

Commit

Permalink
Only stick beatmap discussion timestamp on the discussion page
Browse files Browse the repository at this point in the history
  • Loading branch information
nanaya committed Jun 30, 2023
1 parent 671ce46 commit 488c436
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
13 changes: 7 additions & 6 deletions resources/css/bem/beatmap-discussion-timestamp.less
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@

// avatar + paddings + margins
height: (@beatmap-discussion--avatar-size + 20px + 10px);

align-items: center;

display: flex;
position: sticky;
// 36px is page-extra-tabs height on desktop.
// This doesn't work when the new discussion box is visible.
top: calc(var(--navbar-height) + 36px);

&--sticky {
position: sticky;
// 36px is page-extra-tabs height on desktop.
// This doesn't work when the new discussion box is visible.
top: calc(var(--navbar-height) + 36px);
}

&__icons {
display: flex;
Expand Down
2 changes: 1 addition & 1 deletion resources/js/beatmap-discussions/discussion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ export class Discussion extends React.Component<Props> {

private renderTimestamp() {
return (
<div className='beatmap-discussion-timestamp'>
<div className={classWithModifiers('beatmap-discussion-timestamp', { sticky: this.props.isTimelineVisible })}>
{this.props.discussion.timestamp != null && this.props.isTimelineVisible && <div className="beatmap-discussion-timestamp__point" />}
<div className="beatmap-discussion-timestamp__icons-container">
<div className="beatmap-discussion-timestamp__icons">
Expand Down

0 comments on commit 488c436

Please sign in to comment.