Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/v15/code storage #67

Open
wants to merge 12 commits into
base: develop/v15
Choose a base branch
from
Open

Fix/v15/code storage #67

wants to merge 12 commits into from

Conversation

1000-x-t30
Copy link
Contributor

  • 生成コード履歴をlocalStorageに残す機能を追加
  • メディアを生成した時、プレビュータブを切り替えると毎回 js-media が発火する問題を修正
  • コードコピー時の吹き出しが他の要素に被る問題を修正
  • 生成されるフィールドの ID を [カスタムフィールド名]-[値をエスケープしたもの] に修正
  • バリデーターを追加したときにオプションが見切れる問題を、アコーディオンの実装方法を見直すことで修正

@1000-x-t30 1000-x-t30 self-assigned this Jan 22, 2025
Copy link
Contributor

@uidev1116 uidev1116 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@1000-x-t30
いくつかコメントつけました!ご確認のほどよろしくお願いいたします。 🙇🏻

@@ -38,7 +38,7 @@ export function FileInput(props) {
<img src={src} width="64" height="64" alt={alt} />
</a>
{editMode === 'preview' ? null : `<!-- END ${item.name}@path:veil -->`}
<input type="file" name={item.name} id={id} />
<input type="file" name={item.name} id={item.name} />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@1000-x-t30
せっかくなら削除のチェックボックスもid統一したい気がしますがいかがでしょうか?

@@ -51,7 +51,7 @@ export function ImageInput(props) {
{editMode === 'preview' ? null : '<!-- END_IF -->'}
<input
type="file"
id={id}
id={item.name}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@1000-x-t30
こちらも削除チェックボックスのidも統一したい気がしますがいかがでしょうか?

@@ -112,7 +112,7 @@ export function Media(props) {
<input
type="hidden"
name={item.name}
id={id}
id={item.name}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@1000-x-t30

mode === 'customfield' のところだけ id がついてて他ついてないのですが、これってどういう違いでしたっけ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@uidev1116
意図的に違いをつけたわけではありません。fileやmediaはinputがたくさんあり、label をどれに紐づけるべきか、そもそも紐づけるものなのか悩んでバラバラになっている状態です。最終的につけないで統一したつもりでしたが抜けていました。
どうするのがいいでしょうか?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@1000-x-t30
なるほど。input[type="hidden"] にidをつけてもlabel と紐づかないので、メディアとリッチエディターはつけないで統一でいいかもです。

ファイルは input[type="hidden"] ではないのでつけたほうが良いです!

@@ -63,7 +63,7 @@ export function RichEditor(props) {
{isValue ? (
<>
<input
id={id}
id={item.name}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@1000-x-t30
ここも customunit と unitgroup はidがついてないのですが意図的ですか??

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@uidev1116
こちらもfile, mediaと同様の理由です。

@uidev1116
Copy link
Contributor

@1000-x-t30
確認です。フィールグループやユニットのフィールドグループのときは idが同じでも、 cms のJS側でidが振り直されるんですよね。

@1000-x-t30
Copy link
Contributor Author

1000-x-t30 commented Jan 23, 2025

@uidev1116

確認です。フィールグループやユニットのフィールドグループのときは idが同じでも、 cms のJS側でidが振り直されるんですよね。

はい、その通りです!
{id}[0] ← こんなのがつきます!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants