Feature/sieve filter - #3334
Conversation
|
Hi @dehnhardt, nice work! :) So the interface indeed can use a bit of clarification. Did you look at how Gmail, Apple Mail or Sogo mail do filtering? Here some examples, but best to try it out yourself: |
|
Thank you for your GUI-Review, @jancborchardt.
But I am still very unsure about the design of area 1. This functionality is not yet available in any Sieveclient implementation I know of, but I want it for two reasons. I will try to present it again briefly: What I plan to do is the following (and this is not implemented ye
For area 2, it would then still make sense to copy individual filters and append them to other filter sets. But this is rather trivial and can be realized via actions. Ok, this is not short now, but I would be very grateful for design suggestions for the latter functionality (and of course for my 'conclusions')! |
|
Amazing work @dehnhardt 👍 As you asked for design input. I like the way rainloop manages sieve filters. It's super simple. I never run into the situation to need filter sets. It's probably a feature for advanced users. |
|
Feel free to take a look at the web-based open source solution @thsmi maintains - Sieve Editor. It could save some time to bring over some ideas and maybe even allow to share some code. |
You already use a filterset with Rainloop ;-) See my comments in #3334 (comment) |
I don't think this GUI is for everyone. @jancborchardt, mayby you can have a look at it: Sieve Editor. I am not sure if a pure JS solution can be integrated. I will check that. Maybe we can use parts of it. |
@dehnhardt From my point of view Sieve is more a flexible programming language than But in reality all of the UIs I know of use sieve as a filter description language. Which means they simplify the syntax to a tiny subset. This makes rendering very easy, but has the side effect that you loose interoperability. The UI is only capable of rendering rules it created. If a user edits a rule manually or via another tool all of the implementations fail dramatically. And this is by design because every implementation defines their subset differently. The "Sieve Editor" was designed to be different. It does not limit the syntax. It is capable of rendering almost any sieve script. But you don't get that for free the implementation is way more complex and it also offload complexity to the user. So your assumption is correct. It is not intended for everyone. Don't get me wrong, both possibilities are viable approaches. From the course of the ticket I would say your One hint for from my lesson learned. Add an advanced mode with a very simplistic text editor to your UI which allows manually editing scripts. So that the user has a chance to fix broken scripts. And yes you will endup having scripts which do not render due to UI bugs. Without such an editor the "normal" user ends up being pissed because the only way to fix is to delete their precious filter script. And vice versa they react extremely thankful if you helped to savaged their precious script. |
I do not consider a discussion as spam ;-) It's about deciding whether we want a full implementation of the Sieve filter specification or one that can be used by as many users as possible. |
|
It looks to me as if you somehow misunderstood my post. I did not intend to propose, suggest or advocate for any kind of an interface. The way you currently go is perfect for your use-case. But you should be and you are (according to your response) aware that your implementation will be incompatible with other implementations. There is nothing which can be done to fix this, but this is perfectly fine for your scenario. All the other sieve implementation are also based upon this assumption. The "Sieve Editor" was designed for a completely different use-case. So it does not make any sense trying to reuse it in your simplified scenario. There is no need for you to handle all the ugly corner cases (like deep nesting, implicit keeps, syntax glitches). You would just wast your time changing something square to round. But you should consider adding an additional advanced mode to your UI, e.g. a very simplistic plain text editor. This allows a user do worst case/disaster recovery in case the script was edited/destroyed by an other sieve editor or your implementation. And this will happen, guaranteed. Having such a fallback is a tiny tweak but makes a huge difference for your users in worst case. As plain text editor I can suggest codemirror. Just to clarify this should be additionally to your UI, as a fallback. Concerning your question, technically it is extremely easy to integrated the graphical editor part from the Sieve Editor. It is just including an iframe, the API is a getScript and setScript message that is all. But it won't be too useful in your use-case (e.g. It expects to run full screen). The plaintext editor is just a vanilla codemirror. Long time ago I up-streamed the sieve syntax highlighting. So all you need to do for having a plain text sieve editor, is integrate codemirror and enable the sieve syntax highlighting. To sum up my point:
|
5ac4c9d to
974d615
Compare
1dfeafe to
57e6bc4
Compare
|
Why did this PR get closed? I couldn't find anything related 😢. |
|
I had to reset the changes. (Hoepefully) Will be open again in a few minutes... |
b18961c to
276e12f
Compare
Signed-off-by: Holger Dehnhardt <holger@dehnhardt.org>
Signed-off-by: Holger Dehnhardt <holger@dehnhardt.org>
Signed-off-by: Holger Dehnhardt <holger@dehnhardt.org>
Signed-off-by: Holger Dehnhardt <holger@dehnhardt.org>
Signed-off-by: Holger Dehnhardt <holger@dehnhardt.org>
|
Hi, I tried to merge this onto the current main branch to give it a test spin, but failed. I'd put 200€ onto the bounty if this pull request would be kept in sync with the main branch, and another 200€ if merged (where can one find said bounty facilitation?). Sincerely, Malte |
Please don't: https://help.nextcloud.com/t/dont-use-bountysource-anymore/84943 Instead hire someone to do this, do it yourself or get a Nextcloud subscription. |
Sorry, but due to a new Job, currently I don't have time to work on this. |
Signed-off-by: Holger Dehnhardt <holger@dehnhardt.org>
276e12f to
aa0134b
Compare
|
Hi 👋, we are about to merge #4472. This isn't the full sieve feature but merely the basics with sieve credentials, provisioning and so on and "just" a basic UI, but this will be the foundation for any other enhancements. Therefore I'm closing this PR and the other one. Thanks a lot everyone who has helped move this forward. Even if this PR wasn't integrated it was a huge help for Daniel's implementation. ✌️ |
|
I might be willing to pick this up, is there a specific reason that it hasn't been merged? It looks like a good solution and there isn't currently a UI for Sieve within nextcloud other than the standard simple textarea? |
|
We track the feature in #44. |





This PR provides an interface to the Managesieve protocol.
The user interface is somewhat more complex. For clarification I have added a screenshot.
I would be happy to receive constructive criticism about it, as I am not sure if it is understandable (Maybe @jancborchardt?).
The elements (according to numbering):
Filter sets can be added. Deleting filter sets is currently without function.
A few more remarks about the implementation: