RockESV / Eris

A darker, cooler, classier look for Discord.
GNU General Public License v3.0
10 stars 11 forks source link

[Bug] Threads are no indented properly, causing overlapping issues #3

Closed Crec0 closed 2 years ago

Crec0 commented 2 years ago

Issue

Threads are styled with .typeThread-2Aqh6X .content-1gYQeQ however, only .content-1gYQeQ is used to style the channels at https://github.com/RockESV/Eris/blob/main/ErisSource.css#L123-L128

This is causes overlapping issues with the L shape svg spline. Since the svg is done before the thread list and is therefore outside the scope of .content-1gYQeQ unlike channels where it's within it's scope.

image

Workaround for this indentation issue:

Add this css snippet to overwrite margin applied by .content-1gYQeQ and z-index the spline so it doesn't overlap with selection.

.typeThread-2Aqh6X {
    text-indent: 1.625rem !important;
}

.spine-29OFwR {
    z-index: 1 !important;
}

Using the above fix, the result looks like this: image

RockESV commented 2 years ago

Thank you for reporting this! I don't use threads, so I never noticed this.

To fix this issue, I added an exception to channel styling for threads and styled threads individually, as there was an issue where the background of the thread overlapped the spine.

.containerDefault-YUSmu3 .content-1gYQeQ:not(.container-1Bj0eq .content-1gYQeQ) {
    padding-left: 12px !important;
    margin-left: 4px !important;
    border-top-left-radius: 0px !important;
    border-bottom-left-radius: 0px !important;
}

.selected-2TbFu:not(.modeSelected-3DmyhH .selected-2TbFu), .modeSelected-3DmyhH:not(.typeThread-2Aqh6X) {
    background-color: var(--brand-experiment) !important;
    border-top-right-radius: 5px !important;
    border-bottom-right-radius: 5px !important;
    box-shadow: 0 4px 9px rgba(0 0 0 / 0.2) !important;
}

.modeSelected-3DmyhH.typeThread-2Aqh6X .content-1gYQeQ {
    box-shadow: 0 4px 9px rgba(0 0 0 / 0.2) !important;
    border-left: 3px solid var(--brand-experiment) !important;
    border-top-left-radius: 0px !important;
    border-bottom-left-radius: 0px !important;
}

This is the result: image image

Thanks again!