refactor!: AccordionPanel を Accordion にrename#6255
Draft
AtsushiM wants to merge 1 commit into
Draft
Conversation
commit: |
Contributor
|
名称変更に向けてだと思う&既に話し合い済みだった気もするんですが、改めてコード見てるとsmarthr-uiの基本方針に合わせるとSummary/Detailsになるんじゃないか…?という気がしてきました |
ba43c7a to
6b1d5b0
Compare
Member
Author
|
あー、複数であることを表せねぇかなぁと思ってたんですがそれな気がしてきたぞ... 検証してみます |
…構造に変更 ## 変更内容 ### コンポーネントのrename - `AccordionPanel` → `Details` - `AccordionPanelItem` → `DetailsItem` - `AccordionPanelContent` → `DetailsContent` - `AccordionPanelTrigger` → `Summary` ### マークアップ構造の変更 - Details: `<div role="presentation">` → `<ul>` - DetailsItem: `<Section>` → `<li><Section className="shr-contents" /></li>` ### 詳細な変更 - ディレクトリ名: `AccordionPanel/` → `Accordion/` - CSS class名: `smarthr-ui-AccordionPanel-*` → `smarthr-ui-Details-*` - Context名: `AccordionPanelContext` → `DetailsContext`, `AccordionPanelItemContext` → `DetailsItemContext` - Helper関数の型: `HTMLDivElement` → `HTMLUListElement` - data-component: `AccordionHeaderButton` → `SummaryButton` Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
d8ea5c9 to
90e0d2c
Compare
Member
Author
|
色々検討してみました。
となっていたので個人的には
とかどうでしょう? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
関連URL
#6255 (comment)
#6255 (comment)
概要
AccordionPanelをDetails/Summaryにリネームし、マークアップを
ul > li > Section構造に変更します。HTMLの
<details>/<summary>要素に合わせた命名で、アコーディオンの意味をより明確にします。変更内容
コンポーネントのrename
AccordionPanel→DetailsAccordionPanelItem→DetailsItemAccordionPanelContent→DetailsContentAccordionPanelTrigger→Summaryマークアップ構造の変更
詳細な変更
AccordionPanel/→Accordion/smarthr-ui-AccordionPanel-*→smarthr-ui-Details-*<div role="presentation">→<ul><Section>→<li><Section className="shr-contents" /></li>src/index.tsのexport更新命名の理由
HTMLの
<details>/<summary>要素をベースとした命名です。複数のアイテムを持つことを表現するため、DetailsItem も追加しています。
プロダクト側で対応が必要な事項
以下のimportと使用箇所を変更してください。
使用箇所も同様に変更が必要です。
確認方法
pnpm ui lintが通ることを確認ul > li > section構造になっていることを確認