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

feat(ui-debug): update the view #2093

Merged
merged 23 commits into from
Sep 16, 2024
Merged

Conversation

skamril
Copy link
Member

@skamril skamril commented Jul 16, 2024

ANT-1888

@skamril skamril self-assigned this Jul 16, 2024
@skamril skamril requested a review from hdinia July 16, 2024 08:21
@skamril skamril added bug Something isn't working feature request front-end labels Jul 16, 2024
@skamril skamril marked this pull request as draft July 16, 2024 08:22
@skamril skamril force-pushed the feature/ANT-1888_debug_view branch 2 times, most recently from 9bace8c to 14d6eb0 Compare July 23, 2024 15:01
@skamril skamril force-pushed the feature/ANT-1888_debug_view branch 3 times, most recently from 474397b to d3aaeaf Compare August 1, 2024 08:01
@skamril skamril marked this pull request as ready for review August 1, 2024 08:01
@skamril skamril force-pushed the feature/ANT-1888_debug_view branch from d3aaeaf to a1aac53 Compare August 6, 2024 15:09
webapp/package.json Outdated Show resolved Hide resolved
Comment on lines +72 to +83
if (treeData.startsWith("file://") && treeData.endsWith(".ico")) {
return "image";
}
Copy link
Member

@hdinia hdinia Aug 6, 2024

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";
Copy link
Member

@hdinia hdinia Aug 6, 2024

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"

@hdinia
Copy link
Member

hdinia commented Aug 7, 2024

Probably due to the MUI update you have a type issue in SelectSingle.tsx component (in common). (The issue is coming from the Props interface)

@skamril skamril force-pushed the feature/ANT-1888_debug_view branch from a1aac53 to 6698433 Compare September 5, 2024 09:05
@pull-request-size pull-request-size bot added size/XL and removed size/L labels Sep 5, 2024
@skamril skamril force-pushed the feature/ANT-1888_debug_view branch from 3ea0fae to 4042bdf Compare September 11, 2024 07:39
@skamril skamril force-pushed the feature/ANT-1888_debug_view branch from 4042bdf to 298f883 Compare September 13, 2024 08:09
@skamril skamril changed the base branch from dev to release/2.17.6 September 13, 2024 08:10
@skamril skamril force-pushed the feature/ANT-1888_debug_view branch from 298f883 to ac0af1e Compare September 13, 2024 08:12
@skamril skamril force-pushed the feature/ANT-1888_debug_view branch from ddf1368 to 55263f3 Compare September 16, 2024 09:17
* add `path` URL parameter
* display filename
@skamril skamril force-pushed the feature/ANT-1888_debug_view branch from 55263f3 to 7cebe24 Compare September 16, 2024 09:26
@skamril skamril merged commit af206eb into release/2.17.6 Sep 16, 2024
11 checks passed
@skamril skamril deleted the feature/ANT-1888_debug_view branch September 16, 2024 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants