-
Notifications
You must be signed in to change notification settings - Fork 0
作品作成画面の対応拡張子のポップアップ #235
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
base: develop
Are you sure you want to change the base?
作品作成画面の対応拡張子のポップアップ #235
Changes from 2 commits
f5c7684
85b447e
6e29f35
032d64d
611ecf8
8afed66
b6d7332
679563a
4ae3a45
a810fbd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -2,9 +2,10 @@ import type { FC } from 'react'; | |||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| import { AssetRender } from '../../../AssetList/assetRender'; | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| import { InfoPopOver } from './InfoPopOver'; | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| import type { Asset } from '@/domains/Work/types'; | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| import { Horizontal } from '@/components/Layout/Horizontal'; | ||||||||||||||||||||||||||
| import { Vertical } from '@/components/Layout/Vertical'; | ||||||||||||||||||||||||||
| import { DropImage } from '@/components/functional/DropImage'; | ||||||||||||||||||||||||||
| import { Center } from '@/components/ui/Center'; | ||||||||||||||||||||||||||
|
|
@@ -23,27 +24,10 @@ export const AssetUpload: FC<Props> = ({ handleUploadAssets, assets }) => ( | |||||||||||||||||||||||||
| <Typography className="text-red-500" variant="body2"> | ||||||||||||||||||||||||||
| 必須 | ||||||||||||||||||||||||||
| </Typography> | ||||||||||||||||||||||||||
| <InfoPopOver> | ||||||||||||||||||||||||||
| {`対応形式:\n 画像[.png .jpg .jpeg .bmp .gif]\n 動画[.mp4 .mov]\n 音源[.mp3 .wav .m4a ]\n モデル[.gltf .fbx]\n zip[.zip]`} | ||||||||||||||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 拡張子情報は親要素から受け取るわけじゃないからpopoverの中に隠蔽しちゃっていいと思う
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. って思ったけどこれアセットとサムネイルで違うのか |
||||||||||||||||||||||||||
| </InfoPopOver> | ||||||||||||||||||||||||||
| </Vertical> | ||||||||||||||||||||||||||
| <Horizontal className="gap-0 items-start -mt-4"> | ||||||||||||||||||||||||||
| <Typography variant="body2" className="text-gray-500"> | ||||||||||||||||||||||||||
| 対応形式: | ||||||||||||||||||||||||||
| </Typography> | ||||||||||||||||||||||||||
| <Typography variant="body2" className="text-xs text-gray-500 mx-4"> | ||||||||||||||||||||||||||
| 画像 [ .png .jpg .jpeg .bmp .gif ] | ||||||||||||||||||||||||||
| </Typography> | ||||||||||||||||||||||||||
| <Typography variant="body2" className="text-xs text-gray-500 mx-4"> | ||||||||||||||||||||||||||
| 動画 [ .mp4 .mov ] | ||||||||||||||||||||||||||
| </Typography> | ||||||||||||||||||||||||||
| <Typography variant="body2" className="text-xs text-gray-500 mx-4"> | ||||||||||||||||||||||||||
| 音源 [ .mp3 .wav .m4a ] | ||||||||||||||||||||||||||
| </Typography> | ||||||||||||||||||||||||||
| <Typography variant="body2" className="text-xs text-gray-500 mx-4"> | ||||||||||||||||||||||||||
| モデル [ .gltf .fbx ] | ||||||||||||||||||||||||||
| </Typography> | ||||||||||||||||||||||||||
| <Typography variant="body2" className="text-xs text-gray-500 mx-4"> | ||||||||||||||||||||||||||
| zip[ .zip ] | ||||||||||||||||||||||||||
| </Typography> | ||||||||||||||||||||||||||
| </Horizontal> | ||||||||||||||||||||||||||
| <Vertical className="gap-2 w-full overflow-scroll"> | ||||||||||||||||||||||||||
| {assets.map((asset) => AssetRender(asset, 'w-24 p-0'))} | ||||||||||||||||||||||||||
| </Vertical> | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,27 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import type { FC, ReactNode } from 'react'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import { Info } from 'lucide-react'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Tooltip, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| TooltipContent, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| TooltipProvider, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| TooltipTrigger, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } from '@/components/ui/Tooltip'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type Props = { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| children: ReactNode; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const InfoPopOver: FC<Props> = ({ children }) => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <TooltipProvider> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <Tooltip> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <TooltipTrigger> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <Info size={16} color="#757575" /> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </TooltipTrigger> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <TooltipContent className="rounded-md relative text-xl border-2 bg-white border-orange-pop"> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <p className="whitespace-pre-wrap text-[10px] font-bold">{children}</p> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </TooltipContent> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
冗長ではあると思うけど私だったらこういうふうに書くかも(動くかどうかは確かめてない、あくまでイメージ) supportedExtっていうpropsを取ってそれを元にPopoverがレンダリングする supportedExtは で親からsupportedExtを渡すだけでpopoverが統一されたスタイルでレンダリングをしてくれる 親が渡すsupportedExtは固定値で持っておけば何か変更があったとしても構造体を変えるだけでそれまでと同様のスタイルが保てる(文字列だと開発者がスタイルを気にして開発しなきゃいけなくなる(ドットだったりスペースだったり))
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ありがとうございます 勉強になりま |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </Tooltip> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </TooltipProvider> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
文字の前後の空白を入れるか入れないかで統一してほしいです
[.xxx]or[ .xxx ]前者なら以下の修正