remove client side URL rewrites
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- javascript
調査の方向性
app.js の ?qs= URL を構築するリダイレクトから開始し、次に issue で説明されているクライアント側の URL 書き換えと version-dropdown の動作を調べます。1.6/dijit/Calendar パスを含む dojo-api-data の生成ページを比較し、permalink URL が選択したバージョンを保持し、dapi パスを使用し、dropdown が同期された状態になることを確認します。
索引モデルが issue の本文から書いたものです。
説明
If I select 1.4 in the dropdown and bring up dijit/Calendar, then click the Permalink, the URL bar goes to https://dojotoolkit.org/api/?qs=1.4/dijit/Calendar. Happens for 1.3 〜 1.7.
Two issues:
- Ideally it would be https://dojotoolkit.org/dapi/1.10/dijit/Calendar.html rather than using the URL query string (question mark syntax).
- The URL switched from referencing dapi to api. I guess that won't be an issue when this is deployed for real, but probably indicates some underlying problem.
This problem is leftover effect from when we were serving pages statically and the rewrite was happening in client-side javascript. By turning off javascript and clicking the Permalink URL (and then view source) I can see:
<script type="text/javascript">
// If user loads this page directly, redirect to index page, with parameter to initially show tab for this module.
// If google loads this page directly it will hopefully ignore this script and just index the documentation below.
// Also, when this page is loaded via XHR this script block should be ignored.
location = "/api/?qs=1.10/dijit/_OnDijitClickMixin" + location.hash;
</script>
I remember having a perl script that added those <script> blocks but now I can't find the check-in. I don't see those script blocks [anymore] either in https://github.com/wkeese/dojo-api-data/tree/master/1.6/dijit/Calendar, so I'm confused.
There's also this code in app.js:
// rewite the url to the ?qs= parm, meaning all legacy permalinked docs are still loaded via XHR.
// the only other option is dynamically including the html in the template which wouldn't be good for performance
// TODO: the .html extension is an issue, here im stripping it (compared to legacyfilelocation), this is also mirrored in the client JS (and FWIW apache)
res.redirect(301, config.contextPath + '?qs=' + requestedVersion + '/' + modulefile.replace(/\./g, "/"));
A related issue is that after doing the above, the dropdown says 1.10 instead of 1.4, even though the tree is showing 1.4. Selecting 1.10 in the dropdown list manually now has no effect. (But I can get back to the 1.10 tree by selecting 1.9 first, then selecting 1.10).
- 主要言語
- CSS
- スター
- 11
- フォーク
- 4
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
dojo/dapi のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
-
do we need this registered via npm?再び着手できるかも @wkeese が 4874 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
-
more test coverage再び着手できるかも @lbod が 4924 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
Agenta-AI/agenta#7542 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Harden bayesian-waves-bg.js: add prefers-reduced-motion, pointer-events guard, and hidden-tab pauseオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
njitacm/njit-acm-website#110 ·
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100