Document redirectTo() on fixture page and page data builders
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 半日
- 初心者へのやさしさ
- 68/100
- issue の種類
- ドキュメント
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- markdown, php
調査の方向性
content/4.api/ 配下の fixtures ページで、既存の $cwa->redirect() のドキュメントの隣にある内容を開き、issue 内の redirectTo() の例と動作の一覧を読んでください。推測せず、リンクされている API バンドルの PR (#468) で動作を確認してください。ページに、redirectTo() と redirect() の違い、有効なターゲット、失敗するケース、--append のルール、generate-fixtures の変更点が説明されていれば完了です。
索引モデルが issue の本文から書いたものです。
説明
API bundle PR: https://github.com/components-web-app/api-components-bundle/pull/468 (fixes components-web-app/api-components-bundle#461)
What to document
The fixture builder has a new method on page and page data builders, redirectTo(routeName). It makes the page's own route redirect to another route, for a URL that is both a page and a redirect. A common case is a home page at / that forwards to a section.
$cwa->page('home', uiComponent: 'Primary', layout: 'main', route: '/', routeName: 'home')
->title('Home')
->redirectTo(routeName: 'graphs');
$cwa->pageData($pageData, template: 'conference', route: '/events')
->redirectTo(routeName: 'cwa-conference');
Points for the fixtures / scaffold page (content/4.api/):
- How it differs from
$cwa->redirect('/old', to: 'about'):redirect()creates a separate route that has no page, whileredirectTo()makes the page's own route redirect. - The target is a route name: any route in the same load, including a
$cwa->redirect()route, or one already in the database. An unknown name fails the load with a message naming the page or page data. - A page or page data with no route of its own (a template,
withoutRoute(), or no title and noroute:) cannot redirect, and the load fails with a message namingredirectTo(). doctrine:fixtures:load --append: the redirect is set only on a route the load creates. A page that already exists, or a route whose path is already in use, keeps the redirect it has.generate-fixturesnow writes->redirectTo(routeName: …)for a page or page data whose route redirects. Before this, it dropped the redirect and reported nothing. A target that is not part of the site is listed under "could not be reproduced".
- 主要言語
- TypeScript
- スター
- 0
- フォーク
- 0
- 平均マージ
- 1時間 20分
- マージ済み PR(30日)
- 1
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
components-web-app/docs のほかの issue
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
components-web-app/docs#260 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
components-web-app/docs#259 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
components-web-app/docs#258 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
components-web-app/docs#257 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
components-web-app/docs#256 · コメント 1 件 ·
components-web-app/docs の issue をすべて見る
似ている issue
-
bug priority: P2
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
mattermost/compass-design#106 ·
メンテナーはふだん 1 日以内に返信
-
clawsweeper:needs-maintainer-review clawsweeper:needs-product-decision clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:other issue-rating: 🦞 diamond lobster P2
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
openclaw/openclaw#176671 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
nordcraftengine/nordcraft#1400 ·
メンテナーはふだん 1 日以内に返信