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

Add Bulk Tagging on new Files app [28+] #45935

Open
luluwebmaster opened this issue Jun 17, 2024 · 6 comments
Open

Add Bulk Tagging on new Files app [28+] #45935

luluwebmaster opened this issue Jun 17, 2024 · 6 comments
Assignees
Labels
1. to develop Accepted and waiting to be taken care of enhancement feature: files feature: tags good first issue Small tasks with clear documentation about how and in which place you need to fix things in. 🍀 2025-Spring
Milestone

Comments

@luluwebmaster
Copy link

How to use GitHub

  • Please use the 👍 reaction to show that you are interested into the same feature.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Is your feature request related to a problem? Please describe.
Hello everyone,

Since my recent update to Nextcloud 28, I’ve noticed a change in the file tagging functionality. Previously, I had the ability to tag multiple files simultaneously, but this feature seems to have disappeared since the update. This limitation is causing an inconvenience as I frequently use the tagging feature to organize my files.

Describe the solution you'd like
I would like to have the ability to tag multiple files simultaneously reinstated in Nextcloud 28.

Describe alternatives you've considered
Currently, the only alternative is to tag files individually, which is time-consuming and less efficient.

Additional context
Has anyone else encountered this issue? Is it a new feature introduced in version 28, or is it potentially a bug? If anyone has information on this matter or has found a solution, I would appreciate it if you could share. Otherwise, can we consider reporting this as a potential issue to the development team?

Thank you in advance for your responses and assistance!

@luluwebmaster luluwebmaster added 0. Needs triage Pending check for reproducibility or if it fits our roadmap enhancement labels Jun 17, 2024
@scintillae
Copy link

I see no way to give a reaction to this (it simply isn't an option presented to me).

However, bulk tagging ability is an important functionality of Nextcloud file management, and I believe it needs to be repaired and supported.

@luluwebmaster
Copy link
Author

I just added it. It should be good now.

This is also an option that I would like to find again !

@moritzthecat
Copy link

absolutely required feature ...
example: discuss a set of files for review. together with comments a must have for collaborative work esp. on set of many files, like photos.

@kesselb
Copy link
Contributor

kesselb commented Jun 29, 2024

cc @sorbaugh @artonge

@artonge
Copy link
Contributor

artonge commented Jul 1, 2024

I guess it is a regression from the migration to vue.
Pull requests are welcome. It should be much easier than before to add this to the Files app :).

Steps would be:

  1. Implement the exec and execBatch methods of the systemtag action:
    export const action = new FileAction({
    id: 'system-tags',
    displayName: () => '',
    iconSvgInline: () => '',
    enabled(nodes: Node[]) {
    // Only show the action on single nodes
    if (nodes.length !== 1) {
    return false
    }
    const node = nodes[0]
    const tags = getNodeSystemTags(node)
    // Only show the action if the node has system tags
    if (tags.length === 0) {
    return false
    }
    return true
    },
    exec: async () => null,
    async renderInline(node: Node) {
    // Ensure we have the system tags as an array
    const tags = getNodeSystemTags(node)
    if (tags.length === 0) {
    return null
    }
    const systemTagsElement = document.createElement('ul')
    systemTagsElement.classList.add('files-list__system-tags')
    if (tags.length === 1) {
    systemTagsElement.setAttribute('aria-label', t('files', 'This file has the tag {tag}', { tag: tags[0] }))
    } else {
    const firstTags = tags.slice(0, -1).join(', ')
    const lastTag = tags[tags.length - 1]
    systemTagsElement.setAttribute('aria-label', t('files', 'This file has the tags {firstTags} and {lastTag}', { firstTags, lastTag }))
    }
    systemTagsElement.append(renderTag(tags[0]))
    // More tags than the one we're showing
    if (tags.length > 1) {
    const moreTagElement = renderTag('+' + (tags.length - 1), true)
    moreTagElement.setAttribute('title', tags.slice(1).join(', '))
    systemTagsElement.append(moreTagElement)
    }
    return systemTagsElement
    },
    order: 0,
    })
  2. In those methods, open a modal displaying a form allowing the user to pick tags. Example from the new node action:
    spawnDialog(NewNodeDialog, {
    ...labels,
    defaultName,
    otherNames: contentNames,
    }, (folderName) => {
    resolve(folderName as string|null)
    })
    })
  3. Then update the chosen tags with
    export const setTagForFile = async (tag: TagWithId | ServerTagWithId, fileId: number): Promise<void> => {
    const path = '/systemtags-relations/files/' + fileId + '/' + tag.id
    const tagToPut = formatTag(tag)
    try {
    await davClient.customRequest(path, {
    method: 'PUT',
    data: tagToPut,
    })
    } catch (error) {
    logger.error(t('systemtags', 'Failed to set tag for file'), { error })
    throw new Error(t('systemtags', 'Failed to set tag for file'))
    }
    }

@skjnldsv skjnldsv added 1. to develop Accepted and waiting to be taken care of and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Aug 9, 2024
@skjnldsv skjnldsv changed the title Issue with Bulk Tagging since Nextcloud 28 Updat Add Bulk Tagging on new Files app [28+] Sep 18, 2024
@joshtrichards joshtrichards added the good first issue Small tasks with clear documentation about how and in which place you need to fix things in. label Sep 26, 2024
@nousernameavailableanymore

In which version will this be added again?

@sorbaugh sorbaugh added this to the Nextcloud 31 milestone Oct 2, 2024
@susnux susnux self-assigned this Oct 8, 2024
@skjnldsv skjnldsv assigned skjnldsv and unassigned susnux Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of enhancement feature: files feature: tags good first issue Small tasks with clear documentation about how and in which place you need to fix things in. 🍀 2025-Spring
Projects
Status: 📄 To do (~10 entries)
Development

No branches or pull requests

10 participants