Skip to content

[RFC] Global events naming convention #131

@skjnldsv

Description

@skjnldsv

Intro

Welcome!

Since I find it quite awesome that we can use global events, I think we should aim for a nice convention.
Let's list an example of potential events we could see across Nextcloud... 🤔

Thoughts

  • A file have been updated
  • An app have been enabled/disabled
  • A contact have been deleted
  • A file have been uploaded
  • A header menu have been opened
  • The sidebar have been toggled
  • ...

Goals

I think it would be nice to have some kind of modifier syntax.
I really dislike underscores, so I would favour dashes.

Proposal

  • files:file.update
  • contacts:contact.delete
  • nextcloud:app.disable
  • nextcloud:unified-search.search

Sub-proposal

I would love to be able to watch for partial event names.
Like file:update:12345 and file:update would both trigger if the file 13245 is updated?

Questions

  • Shall we enforce the dashes and throw errors
  • Shall we strongly suggest the syntax event:modifier:data (e.g. file:update:12345)
    • If so, the header-menu-unified-search:open should most likely be header-menu:open:unified-search ?

Thanks!
cc @georgehrke @korelstar @ma12-co @juliushaertl @ChristophWurst @raimund-schluessler @danxuliu @rullzer

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is neededquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions