Sidebar can sometimes briefly appear on left side of screen before moving to right

オープン
#7,341 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
css, javascript, tailwindcss

調査の方向性

pull request 7293 の workaround と pull request 7309 のサイドバー修正を確認し、デプロイ後の初回ロード時の動作を再現してください。CORS preflight リクエストによって annotator CSS bundle が遅延するかどうかを測定し、サイドバーが右側に落ち着く前に左側に一瞬表示されることが決してないことを確認してください。

索引モデルが issue の本文から書いたものです。

説明

During the migration to Tailwind v4, we had to add a workaround for an issue with CSS @property declarations not working inside Shadow DOM. This workaround involved changing the annotator CSS bundle to be loaded cross-origin so it can be read from JS. After this we observed a problem where the sidebar would sometimes appear in the wrong place, due to a latent problem with the sidebar that was resolved (https://github.com/hypothesis/client/pull/7309). While that PR mostly resolved the problem, I have noticed that sometimes immediately after a deployment there can be cases where the sidebar appears on the left side of the screen very briefly and then moves over to the right.

The issue resolved in https://github.com/hypothesis/client/pull/7309 is not new. I believe the reason we started seeing it after upgrading to Tailwind v4 is because adding the crossorigin attribute results in the browser making CORS preflight requests before loading the stylesheet, but this needs to be verified.

This issue is about:

  1. Resolving the issue where the sidebar can very briefly appear in the wrong position when it first loads.
  2. Verifying whether CORS preflight requests are impacting annotator CSS bundle load times, and by how much. Depending on the result, we might need to change the workaround added in https://github.com/hypothesis/client/pull/7293 so that it doesn't require reading the stylesheet. For example we could extract the @property rules from the stylesheet and embed them in JS.
主要言語
Mustache
スター
743
フォーク
227
平均マージ
6分
マージ済み PR(30日)
1

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

hypothesis/client のほかの issue

hypothesis/client の issue をすべて見る

似ている issue

Web Dev の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。