-
Notifications
You must be signed in to change notification settings - Fork 2
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
Manual tagging of files – single-level tags #377
base: tagging-of-files
Are you sure you want to change the base?
Conversation
Could you please also add, what is still open after this PR. |
while uploading a file I get a error about the tagCollection:
|
return displayNames[currentLocale]!; | ||
} | ||
|
||
return displayNames['en']!; |
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.
probably a comment is helpful that 'en' is always the fallback
@@ -127,6 +127,7 @@ class _FilesScreenState extends State<FilesScreen> { | |||
accountId: widget.accountId, | |||
fileRecord: _filteredFileRecords[index], | |||
trailing: const Icon(Icons.chevron_right), | |||
reload: _loadFiles, |
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.
why do we need the reload again?
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.
why do we need the reload again?
So that the FilesScreen is also updated as soon as an update has been made to the file.
If you navigate back and then click on the file again, the “fileReferenceAttribute” is passed directly from the FilesScreen.
If this is not up-to-date, the current tags are not displayed in the FileDetailScreen either.
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.
second input field in file upload sheet is still there
], | ||
), | ||
), | ||
if (_loading) const ModalLoadingOverlay(text: 'Dokument wird gespeichert...', isDialog: false), |
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.
translation
_tags = widget.fileReferenceAttribute?.tags; | ||
|
||
if (_fileDVO == null) _load(); | ||
_load(); |
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.
why always load?
|
||
@override | ||
Widget build(BuildContext context) { | ||
if (tags == null) { |
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.
do this check in the file details screen. When there are no tags just display this controller, otherwise display the selected tags
if (selectedTags.isEmpty) return (tagsMap: currentLevel, currentPath: ''); | ||
|
||
var currentPath = ''; | ||
for (final tag in selectedTags) { |
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.
@aince42 I have simplified this logic. Please double check if it is still working as intended
I'll put this back to draft, as it is not matching the new design. |
This PR covers single-level tagging of files. |
late FileDVO? _fileDVO; | ||
late LocalAttributeDVO? _fileReferenceAttribute; |
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.
late and ? is a VERY bad combination. Please explain here why you have chosen that.
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.
late and ? is a VERY bad combination. Please explain here why you have chosen that.
You are right, in this case it is useless and causes confusion.
- fix: import - chore: add spacing to row - chore: early return
Readiness checklist
Manual tagging of files
The following is currently possible
Still needs to be implemented
Below you can see screenshots of the currently implemented UI.
It doesn't look good, especially with longer tags.