pgn-viewer icon indicating copy to clipboard operation
pgn-viewer copied to clipboard

feat: make move list accessible to phones in portrait mode somehow

Open jonbgamble opened this issue 2 years ago • 3 comments

Those browsing with orientation lock have no way to access the move list, annotations, comments. And many without orientation lock just aren't aware they need to rotate their phones to get it.

It could be in the triple dot menu, an initialization parameter, or both.

jonbgamble avatar Sep 07 '23 10:09 jonbgamble

I anticipated that the showMoves: "bottom" configuration would activate in portrait mode. However, it appears that even when explicitly setting this configuration, the moves still do not display at the bottom.

bdmendes avatar Jan 06 '25 15:01 bdmendes

Hereby the temporary fix I'm using. It works with release 2.4.7.

@import '../../node_modules/@lichess-org/pgn-viewer/scss/lichess-pgn-viewer.scss';

/** Temporary fix when moves should be displayed below the board. **/
.lpv__side {
    @media (max-width: #{$moves-auto-to-right}) {
        height: 14em;
    }
}

Note: it only works when :

  const lpv = LichessPgnViewer(pgnWidgetElmt, {
    // ...
    showMoves: 'auto'
  });

it does not work when:

  const lpv = LichessPgnViewer(pgnWidgetElmt, {
    // ...
    showMoves: 'bottom'
  });

sylmarch avatar Jun 01 '25 13:06 sylmarch

I've also set the height manually and it works well. This was probably a regression.

bdmendes avatar Jun 01 '25 17:06 bdmendes