Skip to content

Conversation

@yafred
Copy link
Contributor

@yafred yafred commented Feb 12, 2025

Suggestion to fix #16943

On small portrait viewport I swap the controls and the moves and I create another status zone.

small screen fixed 1

small screen fixed 2

small screen fixed 3

Slightly larger screen ...
small screen fixed 4

@yafred yafred changed the title Issue 16943 notifications small viewport Reorganize UI on small viewport Feb 13, 2025
@yafred yafred marked this pull request as ready for review February 13, 2025 14:12
.rcontrols {
grid-area: controls;
@include mq-is-col1 {
grid-area: moves;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You want to change the order of the grid-template-areas property

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see ... it's far more elegant ... let me try

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done,

As for the status message: do you think it's better to create the vnode on the fly or always create it and hide/show it via scss ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assuming the status message should go there (you could explain reasoning for that in your PR comment), i would create the VNode or not based on game state in javascript. and then in css, make it display none by default and show it for mq-is-col1.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like the additional status message pushes the buttons everyone wants to see further down. maybe it's enough that one can usually tell how the game ended from the board?

Copy link
Contributor Author

@yafred yafred Feb 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The additional status message seems important. It is not completely obvious when the game ends by resignation (specially when there is no clock).
If the space on the screen is an issue, we could mimic the app and display a modal for a few seconds ...

image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@yafred
Copy link
Contributor Author

yafred commented Feb 17, 2025

It seems to be a very controversial subject. I am not sure this PR will solve anything

@yafred yafred closed this Feb 17, 2025
@schlawg
Copy link
Contributor

schlawg commented Feb 18, 2025

It seems to be a very controversial subject. I am not sure this PR will solve anything

i'm not sure i follow. switching controls & move list would make draw offers, takeback & rematch requests more visible on mobile devices. isn't that a good thing?

@schlawg schlawg reopened this Feb 18, 2025
@yafred
Copy link
Contributor Author

yafred commented Feb 18, 2025

@schlawg, thanks for your positive feedback

Yes I think it's a good thing.
I meant I don't think it will put an end to the controversy I can sense in the forum and the issue.
Some vocal users say it should go back to what it was before ... unfortunately, I have no experience of how it was before (and when it was).
At the moment, I am trying to build a one year old lila (not as easy as I hoped)

@schlawg
Copy link
Contributor

schlawg commented Feb 18, 2025

are you talking about the poster who wants the move list back above the board? ignore that noise. let's see if we can switch it with controls and get that merged.

@schlawg
Copy link
Contributor

schlawg commented Feb 21, 2025

i added an info dialog helper. you can:

import { info as infoDialog } from 'common/dialog';

    // somewhere in round/src/ctrl.ts...
    infoDialog(viewStatus(ctrl), 3000);

that way round/src/view/main.ts stays unmodified

in case you're unfamiliar with maintainers pushing directly to your repo, you'll want to git pull to get our little function

@yafred
Copy link
Contributor Author

yafred commented Feb 21, 2025

Done ... and it looks better

this.opts.chat?.instance?.post('Good game, well played');
}
endGameView();
if (window.matchMedia('(max-width: 800px) and (orientation: portrait)').matches) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one last nitpick, i believe there is a function for this in common/device called isCol1.

@schlawg schlawg merged commit cb20b6d into lichess-org:master Mar 6, 2025
3 checks passed
@yafred yafred deleted the issue-16943-notifications-small-viewport branch March 7, 2025 05:04
@yafred
Copy link
Contributor Author

yafred commented Mar 19, 2025

@schlawg

https://lichess.org/forum/lichess-feedback/the-new-pop-up-after-the-game

You see why I wanted to close the PR before it degenerates :)

@schlawg
Copy link
Contributor

schlawg commented Mar 19, 2025

They love it, they just cannot yet admit it to themselves.

@ornicar
Copy link
Collaborator

ornicar commented Mar 19, 2025

#17165

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

On some viewports, player cannot see draw/take back offers

3 participants