Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

impr(tape mode): show next line if test has newlines (@NadAlaba) #5868

Open
wants to merge 29 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
1efd175
impr(tape mode): show next line if test has newlines (@NadAlaba)
NadAlaba Sep 5, 2024
2a0c4a4
Merge branch 'master' into tapeMode-newline
NadAlaba Sep 10, 2024
0191df2
re-add nlChar width to afterNewline margin
NadAlaba Sep 13, 2024
2dab48a
Merge branch 'master' into tapeMode-newline
NadAlaba Sep 13, 2024
905b9aa
animate next line shifting when extra letters are typed
NadAlaba Sep 13, 2024
550eb61
Merge branch 'master' into tapeMode-newline
NadAlaba Sep 13, 2024
b021237
only last leading .afterNewline element pushes .words to right
NadAlaba Sep 13, 2024
52688bf
don't hide words after active word
NadAlaba Sep 14, 2024
d9b3b5a
revert last commit
NadAlaba Sep 14, 2024
c34d109
Merge branch 'master' into tapeMode-newline
NadAlaba Sep 18, 2024
1fdc388
Merge branch 'master' into tapeMode-newline
NadAlaba Sep 21, 2024
bb9a510
split updateWordsHeight() and move css changes to test.scss
NadAlaba Sep 21, 2024
615b661
don't remove elements in scrollTape until after the margins are set
NadAlaba Sep 21, 2024
d6dbd99
change naming (hide -> remove)
NadAlaba Sep 21, 2024
a33821b
show 3 lines in tape mode
NadAlaba Sep 21, 2024
63c5da2
refactor updateWordsWrapperHeight()
NadAlaba Sep 21, 2024
9fbef47
add comment
NadAlaba Sep 21, 2024
d88a08f
allow Config.showAllLines change without restart
NadAlaba Sep 21, 2024
23cf24f
remove console.log/trace
NadAlaba Sep 21, 2024
a1c824d
make wordsWrapper's height auto with a max-height of 3 lines
NadAlaba Sep 26, 2024
c7f0ccd
Merge branch 'master' into tapeMode-newline
NadAlaba Sep 26, 2024
30b8ef2
split updateWordsHeight() and move some style changes to .scss files
NadAlaba Sep 26, 2024
d9ba967
revert the max-height commit and align .beforeNewline.offsetTOp with …
NadAlaba Sep 26, 2024
2e6323f
Merge branch 'words-height' into tapeMode-newline
NadAlaba Sep 26, 2024
77008c8
forgot .afterNewline
NadAlaba Sep 26, 2024
8139c75
fix min height instead of height
NadAlaba Sep 26, 2024
2a67b00
center outOfFocusWarning in css when it's possible
NadAlaba Sep 26, 2024
670c2e6
Merge branch 'words-height' into tapeMode-newline
NadAlaba Sep 26, 2024
1e9487b
forgot to set #words.margin before removing elements at the first scr…
NadAlaba Sep 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 31 additions & 14 deletions frontend/src/styles/test.scss
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,23 @@
}
}

&.tape .word {
margin: 0.25em 0.6em 0.75em 0;
white-space: nowrap;
&.tape {
display: block;
text-wrap: nowrap;
width: 200vw;
.word {
margin: 0.25em 0.6em 0.25em 0;
display: inline-block;
vertical-align: top;
}
.beforeNewline {
display: inline-block;
vertical-align: top;
margin: 0.25em 0;
}
.afterNewline {
display: inline-block;
}
}

/* a little hack for right-to-left languages */
Expand Down Expand Up @@ -462,13 +476,13 @@
display: inline-block;
}

&.lastbeforenewline::after {
font-family: "Font Awesome";
font-weight: 600;
content: "\f107";
margin-left: 0.5rem;
opacity: 0.25;
}
//&.lastbeforenewline::after {
// font-family: "Font Awesome";
// font-weight: 600;
// content: "\f107";
// margin-left: 0.5rem;
// opacity: 0.25;
//}

.wordInputHighlight {
opacity: 1;
Expand Down Expand Up @@ -564,9 +578,9 @@
pointer-events: none;
top: -2.5rem;

&.focus {
// top: 0rem;
}
//&.focus {
// top: 0rem;
//}

i {
margin-right: 0.5rem;
Expand Down Expand Up @@ -1182,7 +1196,9 @@
.pageTest {
#wordsWrapper {
position: relative;
overflow: visible clip;
&.tape {
overflow: hidden;
-webkit-mask-image: linear-gradient(
90deg,
rgba(0, 0, 0, 0) 1%,
Expand Down Expand Up @@ -1221,7 +1237,8 @@
}
.outOfFocusWarning {
text-align: center;
height: 0;
height: 100%;
align-content: center;
font-size: 1rem;
z-index: 999;
position: absolute;
Expand Down
1 change: 0 additions & 1 deletion frontend/src/ts/test/test-logic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1416,7 +1416,6 @@ ConfigEvent.subscribe((eventKey, eventValue, nosave) => {
restart();
}
if (eventKey === "difficulty" && !nosave) restart();
if (eventKey === "showAllLines" && !nosave) restart();
if (
eventKey === "customLayoutFluid" &&
Config.funbox.includes("layoutfluid")
Expand Down
Loading
Loading