Skip to content

Commit

Permalink
Fix thread borders
Browse files Browse the repository at this point in the history
  • Loading branch information
moysa committed Dec 20, 2023
1 parent ef22254 commit c92cf7a
Show file tree
Hide file tree
Showing 16 changed files with 98 additions and 79 deletions.
2 changes: 1 addition & 1 deletion src/components/ExploreMenuItem/ExploreMenuItem.module.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.exploreMenuItem {
display: flex;
width: calc(100% - 2px);
width: 100%;
height: 100px;
background-color: var(--background-card);
justify-content: space-between;
Expand Down
2 changes: 1 addition & 1 deletion src/components/HomeHeader/HomeHeader.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
.fixedSelector {
position:fixed;
top: 0px;
width: calc(var(--central-content-width) - 2px);
width: var(--central-content-width);
height: var(--header-height);
z-index: var(--z-index-header);
transition: 0.3s;
Expand Down
28 changes: 24 additions & 4 deletions src/components/Layout/Layout.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
display: grid;
grid-template-rows: var(--header-height) 1fr 82px;
height: 100%;
border-right: 1px solid var(--devider);
}

.leftHeader {
Expand Down Expand Up @@ -61,7 +62,7 @@

.centerColumn {
position: relative;
border-inline: 1px solid var(--devider);
// border-inline: 1px solid var(--devider);
min-height: 100vh;
}

Expand Down Expand Up @@ -91,6 +92,15 @@
width: var(--right-col-w);
grid-template-rows: var(--header-height) 1fr;
grid-row-gap: 28px;

>div {
position: fixed;
width: var(--left-col-w);
display: grid;
grid-template-rows: var(--header-height) 1fr 82px;
height: 100%;
border-left: 1px solid var(--devider);
}
}

.rightHeader {
Expand Down Expand Up @@ -167,11 +177,16 @@
@media only screen and (max-width: 1087px) {
.container {
width: 720px;
grid-template-columns: 48px 600px;
grid-template-columns: 48px 600px 1px;
}

.rightColumn {
display: none;
width: 1px;
>div {
>div {
display: none;
}
}
}
}

Expand Down Expand Up @@ -239,6 +254,11 @@
}

.rightColumn {
display: none;
width: 1px;
>div {
>div {
display: none;
}
}
}
}
12 changes: 7 additions & 5 deletions src/components/Layout/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,14 @@ const Layout: Component = () => {


<div class={styles.rightColumn}>
<div class={styles.rightHeader}>
<div id="search_section">
<div>
<div class={styles.rightHeader}>
<div id="search_section">
</div>
</div>
</div>
<div class={styles.rightContent}>
<div id="right_sidebar">
<div class={styles.rightContent}>
<div id="right_sidebar">
</div>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/NavHeader/NavHeader.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
justify-content: flex-start;
align-items: flex-start;
height: 72px;
width: calc(var(--central-content-width) - 2px);
width: var(--central-content-width);
margin: 0;
padding: 0;
padding-top: 32px;
Expand Down
4 changes: 2 additions & 2 deletions src/components/Note/Note.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
-ms-select: text;
user-select: text;

width: calc(100% - 2px);
width: 100%;

&.parent {
border: none;
Expand Down Expand Up @@ -227,7 +227,7 @@

.content {
.rightSide {
width: calc(100% - 2px);
width: 100%;
}
}
}
Expand Down
1 change: 1 addition & 0 deletions src/components/PeopleList/PeopleList.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
font-weight: 600;
line-height: 20px;
color: var(--text-secondary-2);
background: var(--background-site);
>div{
height: 22px;
>span {
Expand Down
3 changes: 1 addition & 2 deletions src/components/ProfileTabs/ProfileTabs.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
width: 100%;
border-radius: 0;
padding-top: 22px;
border: 1px solid var(--devider);
border-bottom: 1px solid var(--devider);
border-top: none;
}

Expand Down Expand Up @@ -202,7 +202,6 @@
}

.tabContent {
border-inline: 1px solid var(--devider);
min-height: 100vh;
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/ReplyToNote/ReplyToNote.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
outline: none;
display: flex;
align-items: center;
width: calc(100% - 2px);
width: var(--central-content-width);

.leftSideClosed {
width: 60px;
Expand Down
3 changes: 2 additions & 1 deletion src/pages/Explore.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@
display: flex;
flex-direction: column;
width: 600px;
margin-left: -16px;

.exploreCaption {
display: flex;
align-items: center;
padding-left: 24px;
padding-left: 16px;
width: 600px;
height: 84px;
border-bottom: 1px solid var(--devider);
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Notifications.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
}

.notificationTabContent {
width: calc(100% - 2px);
width: 100%;
}

.notificationTabIndicator {
Expand Down
1 change: 0 additions & 1 deletion src/pages/Profile.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
position: relative;
background-color: var(--background-site);
padding-bottom: 4px;
border-inline: 1px solid var(--devider);
}

.editProfileButton {
Expand Down
75 changes: 29 additions & 46 deletions src/pages/Search.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,21 @@
margin-bottom: -3px;
position: relative;

}

.searchHeader {
display: flex;
flex-direction: column;
width: 600px;
margin-left: -16px;

.caption {
display: flex;
align-items: center;
padding-left: 16px;
width: 600px;
height: 84px;
border-bottom: 1px solid var(--devider);
font-weight: 400;
font-size: 32px;
line-height: 34px;
Expand All @@ -15,64 +29,33 @@
}

.addToFeed {
padding-right: 20px;
display: flex;
position: absolute;
bottom: 0px;
width: 100%;
height: 35px;
justify-content: flex-end;
align-items: flex-end;

.noAdd {
display: flex;
align-items: center;
font-size: 16px;
line-height: 25px;
font-weight: 400;
color: var(--text-primary);
opacity: 0.6;
transition: opacity 0.4s;
}

.addButton {
display: flex;
align-items: center;
margin: 0;
padding: 0;
border: none;
background-color: unset;
width: auto;
font-size: 16px;
line-height: 25px;
font-weight: 400;
color: var(--text-primary);
opacity: 0.6;
transition: opacity 0.4s;

>span {
font-weight: 800;
margin-right: 5px;
}

&:hover {
opacity: 1;
transition: opacity 0.4s;
}

&:focus {
box-shadow: none;
}
}
align-items: center;
width: 600px;
height: 41px;
background: none;
border-bottom: 1px solid var(--devider);
}
}

.searchContent {
position: relative;
}

.noResults {
margin-top: 60px;
display: flex;
width: 100%;
justify-content: center;
font-weight: 400;
font-size: 22px;
line-height: 24px;
color: var(--text-tertiary);
text-transform: lowercase;
}

.loader {
margin-top: 60px;
}
30 changes: 17 additions & 13 deletions src/pages/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,26 +85,30 @@ const Search: Component = () => {
<SearchComponent />
</Wormhole>

<PageCaption>
<div class={styles.caption}>
{intl.formatMessage(
tSearch.title,
{ query: query() || '' },
)}
<PageCaption extended={true}>
<div class={styles.searchHeader}>
<div class={styles.caption}>
{intl.formatMessage(
tSearch.title,
{ query: query() || '' },
)}
</div>
<div class={styles.addToFeed}>
<AddToHomeFeedButton
disabled={hasFeedAtHome()}
onAdd={addToHomeFeed}
activeLabel={intl.formatMessage(tActions.addFeedToHome)}
disabledLabel={intl.formatMessage(tActions.disabledAddFeedToHome)}
/>
</div>
</div>
<AddToHomeFeedButton
disabled={hasFeedAtHome()}
onAdd={addToHomeFeed}
activeLabel={intl.formatMessage(tActions.addFeedToHome)}
disabledLabel={intl.formatMessage(tActions.disabledAddFeedToHome)}
/>
</PageCaption>


<div class={styles.searchContent}>
<Show
when={!search?.isFetchingContent}
fallback={<Loader />}
fallback={<div class={styles.loader}><Loader /></div>}
>
<Show
when={search?.notes && search.notes.length > 0}
Expand Down
5 changes: 5 additions & 0 deletions src/pages/Thread.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,8 @@
background-color: var(--background-card);
}
}

.bojan {
background-color: red;
height: 0px;
}
5 changes: 5 additions & 0 deletions src/pages/Thread.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ const Thread: Component = () => {
repliesHolder.setAttribute('style',`min-height: ${minHeight}px`);

scrollWindowTo(rect.top - header - banner);

repliesHolder.setAttribute('style', `height: ${document.documentElement.scrollHeight}px;`)

console.log('TOTAL: ', document.documentElement.getBoundingClientRect(), repliesHolder.getBoundingClientRect())
}, 0)
}
});
Expand Down Expand Up @@ -202,6 +206,7 @@ const Thread: Component = () => {
</For>
</div>
</Show>
<div class={styles.bojan}></div>
</div>
)
}
Expand Down

0 comments on commit c92cf7a

Please sign in to comment.