Closed (fixed)
Project:
Mollom
Version:
7.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
24 Jan 2010 at 22:27 UTC
Updated:
24 Apr 2014 at 17:13 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Bojhan commentedInterested in how this UI will evolve. One of the first D7 modules I can see with such a page :)
Comment #2
dries commentedAttached is a screenshot of the proposed UI. It is not a new concept though -- the 'New role' page (user module) uses a similar concept. Thoughts?
Comment #4
sunMissing PHPDoc.
(and elsewhere) Trailing white-space.
No leading white-space.
Wrong indentation.
All form buttons/actions live in a dedicated #type = 'container' with class 'form-actions' in D7. The form structure should look this way:
$form['actions'] = array(...);
$form['actions']['submit'] = array('#type' => 'submit',...);
We should check that the request went actually well.
Why is this data generated in a theme function?
We should move 'match' before 'text' (also in the form constructor).
l() runs check_plain() on the resulting URL: http://api.drupal.org/api/function/l/7
However, if we have a proper, unique ID, then we should definitely use it. But I guess we don't?
Nope.
On the actual UI:
Powered by Dreditor.
Comment #5
dries commentedUpdated patch.
- Made the delete operations work, except for URLs because of encoding/decoding issues. Having an ID would be handy.
- Implemented some of sun's suggestions but not all of them yet.
@sun, 'Language' is the language the blacklist string is in, not the language in which it should be blocked. Not sure how to clarify that.
Comment #6
dries commented- The delete operations work 100% now.
- I don't know how to make the language selection less confusing, so maybe that should be removed?
Comment #7
dries commented- Asked my wife about the language setting on the blacklist UI and she was confused to. Yay for quick and easy UX testing.
- Talked to Ben about the language setting and decided that it would be best to just remove it.
- I removed the language parameter from mollom.addBlacklistText() in mollom.test -- already committed to both DRUPAL-6--1 and HEAD.
- I removed the language setting from the blacklist UI -- updated patch attached.
Comment #8
dries commentedAdded tests for the blacklist UI. Only a couple of @todo list items left.
Comment #9
Bojhan commentedCould you add a new screenshot? I want to give it a review.
Comment #10
dries commentedComment #11
Bojhan commentedI would actually propose using the "Add new text" or "Add new URL" row inside the table, simliar too admin/structure/types/manage/article/fields (without the drag & drop toggle ofcourse).
This because on the contrary to the roles table, this list can get somewhat longer. The pattern used on the roles administration is optimized for 3/5 roles, and is actually a somewhat confusing pattern in core (but we didn't get around to fixing it).
Comment #12
dries commented- Improved the error handling, and killed the remaining todos. All blacklist tests pass on CVS HEAD (Drupal 7).
- @Bojhan: thanks for the UX review in #11. I'll play around with different solutions.
Comment #13
dries commentedI committed this to CVS HEAD. Moving to DRUPAL-6--1
Comment #14
sunMore reasons to hate me. :P
Comment #15
sunEven more + backport.
Comment #16
dries commentedCommitted to CVS HEAD and DRUPAL-6--1. Yay.
Comment #17
sunRe-opening, because we have to append
/%/%here. Otherwise, the menu callback is valid and will be invoked even when the two required additional arguments are not present.Powered by Dreditor.
Comment #18
sunAdditionally, one reason is missing here: "low-quality" - intended?
Powered by Dreditor.
Comment #19
Benjamin Schrauwen commentedHere is a proposal for a new blacklist UI implementation using a different and easier backend API (which is not live yet). It also has a more elaborate help text, but it probably is totally not in the right place yet, but I'm not a Drupal hacker :p
This patch is against the HEAD of D6. All comments are welcome.
Comment #20
sunWould be good to put the supportive help text above the form.
Those numbers refer to path arguments in the URL, counting from 0.
You now added one, but the page callback (which is a form builder here, always taking &$form_state by default), only gets one argument (instead of 3).
Do we really need to specify 'reason' here to delete an entry?
With this patch, I think it's singular.
Powered by Dreditor.
Comment #21
Benjamin Schrauwen commentedHere is a patch which solves Sun's comments.
Comment #22
sunHm - this is for D6, right? Let's see what the testbot has to say.
I think that we want to move a short summary of this into mollom_help(), and the detailed explanation into the module help page (also defined in mollom_help()).
After doing so, this entire page callback can be removed, and mollom_menu() can directly invoke
'page callback' => 'drupal_get_form',
'page arguments' => array('mollom_admin_blacklist_form'),
As mentioned earlier in this issue (before this rewrite), we have to add 3 placeholder arguments to the menu item's path, i.e.
And when counting the arguments starting from 0, then the dynamic arguments are 5,6,7 ;)
Please revert - multi-line arrays should always end with a comma in Drupal.
Powered by Dreditor.
Comment #23
Benjamin Schrauwen commentedI did have 5,6,7 in the original patch and you had comments on it so I corrected it :p I'll revert it back.
Comment #24
dries commentedI'll have a look after Ben shared the next version of his patch.
Comment #25
Benjamin Schrauwen commentedHere is an updated version of the patch. The backend API is still a bit in flux, but this probably comes close to a final version.
Comment #26
dries commented1.
This should be moved to the _help() hook.
2.
'Everything' seems a little funny but can't put my finger on it. Maybe 'All' or 'Entire post' would be better? Thoughts?
3. The tests will need to be updated still.
I can probably work on this some, but it would be good to discuss item 2 first.
Comment #27
Benjamin Schrauwen commented1. The problem with _help is that it has all of the modules help, not only the blacklist specific. This is probably do to the global UI design, I have no idea how to change this.
2. "All" is also fine for me. "Entire post" has a bit of connotation that it only applies to the post body, and not to eg the username, email, ...
Comment #29
sunRevamped patch, form, and help texts. Looks RTBC to me.
Needs to be forward-ported after commit.
Comment #30
dries commentedCommitted to DRUPAL-6--1. Thanks Ben and sun.
Comment #31
sunStraight port against HEAD. (untested, so please wait for green light)
+ tiny quick fix for D6.
Comment #33
dries commentedI committed the DRUPAL-6--1 patch because these failures are unrelated. The D7 patch has some real issues though, I think.
Comment #34
dries commentedComment #35
sunSorry, forgot that #value is #markup now, $form_state['input'] always exists now, and when trying to output a link with #type 'link', then one should also assign that #type ;)
Comment #37
sunThe usual fail... #734634: session_id changes without reason during Server response tests
Comment #38
dries commentedCommitted to CVS HEAD. Yay! Thanks sun and Ben.