-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat(ui-debug): update the view #2093
Conversation
9bace8c
to
14d6eb0
Compare
474397b
to
d3aaeaf
Compare
d3aaeaf
to
a1aac53
Compare
webapp/src/components/App/Singlestudy/explore/Debug/Data/Text.tsx
Outdated
Show resolved
Hide resolved
if (treeData.startsWith("file://") && treeData.endsWith(".ico")) { | ||
return "image"; | ||
} |
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.
The addition of an image
file type for the favicon (.ico
) seems not appropriate.
Our backend currently only uses the following URL prefixes for file types:
"matrix://"
= matrix"matrixfile://"
= matrix"json://"
= JSON file"file://"
= mainly used for .txt files
The debug view is not designed for this purpose, as we have no images in the study file system.
You should remove the image-related code unless there's a specific requirement I'm not aware of.
(also any other image that does not have .ico
extension will be treated as a text file here.)
|
||
//////////////////////////////////////////////////////////////// | ||
// Types | ||
//////////////////////////////////////////////////////////////// | ||
|
||
export type FileType = "json" | "file" | "matrix"; | ||
export type FileType = "json" | "matrix" | "text" | "image" | "folder"; |
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.
(see the other comment about image files first)
as stated in the other comment about images, in my opinion you should remove image
. this file type does not exist yet ("image://"
)
you can maybe add an unknown
type for all files that have the "file://"
prefix but not end with .txt
, to handle properly this case, and display a dummy component like Unknown.tsx
that says something like "unsupported file type"
export type FileType = "json" | "matrix" | "text" | "unknown"
webapp/src/components/App/Singlestudy/explore/Debug/Data/Text.tsx
Outdated
Show resolved
Hide resolved
webapp/src/components/App/Singlestudy/explore/Debug/Data/index.tsx
Outdated
Show resolved
Hide resolved
webapp/src/components/App/Singlestudy/explore/Debug/Data/index.tsx
Outdated
Show resolved
Hide resolved
webapp/src/components/App/Singlestudy/explore/Debug/Tree/FileTreeItem.tsx
Show resolved
Hide resolved
Probably due to the MUI update you have a type issue in |
a1aac53
to
6698433
Compare
3ea0fae
to
4042bdf
Compare
4042bdf
to
298f883
Compare
* install and use @mui/x-tree-view instead of the beta version of TreeView * update style * use SplitView * fix data type * fix issue with `list.txt` file displayed like a folder
298f883
to
ac0af1e
Compare
* create a save button in the menu * add missing typing * update style
ddf1368
to
55263f3
Compare
* add `path` URL parameter * display filename
55263f3
to
7cebe24
Compare
ANT-1888