Conversation
41192e4 to
07c4b52
Compare
6d3537d to
e0cd896
Compare
There was a problem hiding this comment.
Pull request overview
This PR updates the GED files UI to replace “type” sorting with “type” filtering, and adds multi-selection actions to create models/photospheres or remove models.
Changes:
- Replace “type” column sorting with filtering in folder and all-files tables, and compute a displayable
typevalue for filtering. - Add multi-selection actions in the files action bar and implement bulk create-model/create-photosphere/remove-model flows in
FilesManager. - Add i18n tokens for plural notifications and model/photosphere labels, and display model/photosphere info in the filename cell.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/i18n/lang/fr.json | Adds new FileNameCell labels and plural/bulk notifications in French. |
| src/i18n/lang/en.json | Adds new FileNameCell labels and plural/bulk notifications in English. |
| src/components/specific/files/folder-table/columns.js | Switches “type” column from sortable to filterable. |
| src/components/specific/files/folder-table/FoldersTable.vue | Feeds formatted rows (with computed type) to enable “type” filtering. |
| src/components/specific/files/files-table/file-name-cell/FileNameCell.vue | Adds model/photosphere indicator tooltip/icon and related logic. |
| src/components/specific/files/files-manager/files-action-bar/FilesActionBar.vue | Adds bulk actions (create models/photospheres, remove models) for multi-selection. |
| src/components/specific/files/files-manager/FilesManager.vue | Implements bulk create/remove handlers and loading state propagation. |
| src/components/specific/files/all-files-table/columns.js | Switches “type” column to filterable (removes sort function). |
| src/components/specific/files/all-files-table/AllFilesTable.vue | Adds type filter UI, improves selection handling, and formats rows to include a computed type. |
| src/components/specific/files/all-files-table/AllFilesTable.scss | Adds missing positioning styling for the “type” header/filter container. |
Comments suppressed due to low confidence (3)
src/components/specific/files/all-files-table/AllFilesTable.vue:330
- When
fileExtension(file.name)returns an empty string (no extension), the current logic producestype: ""(because optional chaining still callsreplaceon ""). Add an explicit fallback so extensionless documents showt("t.file")(and folders showt("t.folder")).
: file.name
? fileExtension(file.name)?.replace(".", "").toUpperCase()
: t("t.file"),
src/components/specific/files/all-files-table/AllFilesTable.vue:371
- The header checkbox uses a length equality check against
displayedListFiles. With filters,selectionmay contain items not currently displayed, which forces an indeterminate state even if all displayed rows are selected. Compute this by checking whether everydisplayedListFilesitem is selected (by id) instead of comparing lengths.
const mainSelectionCheckboxValue = computed(() => {
if (props.selection.length === 0) {
return false;
} else if (props.selection.length === displayedListFiles.value.length) {
return true;
src/components/specific/files/files-manager/files-action-bar/FilesActionBar.vue:96
isModelis imported but never used in this component. Removing the unused import will avoid lint/build warnings and keep the module dependencies accurate.
import { computed } from "vue";
import { useToggle } from "../../../../../composables/toggle.js";
import { useUser } from "../../../../../state/user.js";
import { isFolder } from "../../../../../utils/file-structure.js";
import { isConvertible, isConvertibleToPhotosphere, isModel } from "../../../../../utils/models.js";
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/components/specific/files/files-manager/files-action-bar/FilesActionBar.vue
Outdated
Show resolved
Hide resolved
src/components/specific/files/files-table/file-name-cell/FileNameCell.vue
Outdated
Show resolved
Hide resolved
src/components/specific/files/all-files-table/AllFilesTable.vue
Outdated
Show resolved
Hide resolved
| isCreatingModels.value = true; | ||
|
|
||
| try { | ||
| selection.value = selection.value.map((f) => { |
There was a problem hiding this comment.
We need to re-assign selection.value here, because deleteModels reloads the file structure and replaces file references. Without changing the array reference, the table does not consistently reflect the updated file state. Re-assigning ensures the UI updates while preserving the current selection.
https://platform-dev-model-ged.bimdata.io
Description
This PR introduces two improvements in the GED:
create models,create photospheres, andremove modelsactions based on multi-selectionTypes of changes
Checklist