Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
As part of #664394: Convert remaining tables to "Empty table pattern": Convert remaining tables to "Empty table pattern"
Comment | File | Size | Author |
---|---|---|---|
#5 | empty_ip_addresses.png | 47.38 KB | kika |
#4 | drupal-ip-empty-pattern-1282156-3.patch | 435 bytes | kika |
#1 | 1282156.001.patch | 598 bytes | karschsp |
Comments
Comment #1
karschsp CreditAttribution: karschsp commentedHere's a patch. I sort of broke the pattern since this table appears on the same page where you can add these items.
Comment #3
Bojhan CreditAttribution: Bojhan commentedComment #4
kika CreditAttribution: kika commentedNew patch, /core compatibility, no table type change and wording following #1473210: Empty table pattern for "Blocked IP Addresses" admin page proposal.
I removed the "Add one above" part because this non-standard add UI pattern needs to be overhauled anyway.
Comment #5
kika CreditAttribution: kika commentedThis is how it looks.
Comment #6
Bojhan CreditAttribution: Bojhan commentedLooks good to me.
Comment #7
webchickNice! We should be able to backport this. I can take a look during my next commit spree. However, this is also about enforcing standards, so tagging it that way in case Jennifer wants to get to it first. :)
Comment #8
jhodgdonUmmm... The pattern on the base issue says:
"Pattern outlined in [#501452] :
"If the table contains no records: display within the same table a concise "call to action" message with a link which allows the user to add relevant content.""
This does not contain a call to action, or a link to add relevant content, so I don't think this brings the IP blocking table in line with this standard?
Comment #9
jhodgdonAnd I don't see any discussion supporting #4's comment that "the pattern needs to be overhauled anyway"... Isn't this issue about bringing the IP blocking table in line with the current standard?
Comment #10
kika CreditAttribution: kika commentedIP block addresses functionality uses inline form for adding so there's no /add URL to point in call to action link. Yes, we could have "No blocked IP addresses available. Add one above" as originally suggested by karschsp but I'd better do not depend on specific spacial references in UI (element locations can change).
I'd propose go with what we have now in patch, re-visit when we rethink / harmonize "Add" UI pattern in this page in the future (correct, this discussion has not started yet).
Also, the documented pattern needs expanding, there are several cases in core when we do not have CTA part, just the "No x available" string (content and comment tables).
Comment #11
jhodgdonOK, I guess I am being stupid, sorry... The standards for tables like this page says:
But I see that the actual form to add an IP address is directly above... Actually, that is the non-standard thing. Normally the form to "add a thing" and the table listing the "things" are on different pages.
But still, there is supposed to be a "call to action" in the empty text, and this doesn't have a call to action. Shouldn't it? And should the form be moved to a different page from the listing?
Comment #12
Bojhan CreditAttribution: Bojhan commented@jhodgdon For backport, we cannot make it a separate page. I am on the fence if we should change the existing pattern, other than consistency there is no real reason.
Comment #13
kika CreditAttribution: kika commentedYes, the form should be moved / standardized. Then we could re-visit the empty string.
Comment #14
jhodgdonWhat about going back to the wording in the patch in #2 -- adding "Add one above." to the text? That would be a call to action, thereby satisfying the spirit (I think) of the interface pattern guidelines.
Comment #15
kika CreditAttribution: kika commentedI'd personally avoid spatial references (but yes, help texts are full of those), fix the non-standard "Add x" interaction and re-visit the string. If there's a strong preference for "Add one above" suffix, go for that.
Yes, pattern guidelines should be more specific and tackle edge cases like this.
Comment #16
jhodgdonRE #15 - Not sure what you mean by
...fix the non-standard "Add x" interaction...
?
Comment #17
Bojhan CreditAttribution: Bojhan commentedSo, the approach is:
D7 - Add the empty table pattern, without the "actionable" part
D8 - Change the pattern, and add a page
I would not suffix the "Add one above" part, guidelines are not there to add useless text :)
Comment #18
kika CreditAttribution: kika commented@ jhodgdon will follow-up on this.
Comment #19
jhodgdonRE #17 - so the existing patch needs work, right?
Comment #20
kika CreditAttribution: kika commentedI think #4 is commitable both for D7 and D8. When commited to D8, create a new issue / reference that makes sure that we re-visit committed empty string when we happen to change add interaction.
Comment #21
kika CreditAttribution: kika commentedComment #22
amateescu CreditAttribution: amateescu commentedI agree that the patch from #4 is good to go for now, and I'd like to handle the add interaction in #1161486: Move IP blocking into its own module.
Comment #23
jhodgdonI'm leaving this one for catch/Dries, as it's not strictly "coding standards".
Comment #24
webchickOk, committed and pushed to 8.x and 7.x.
Since the adding a separate page for adding IP addresses is a bigger change, I think it makes sense to close this issue as fixed.
Comment #26
cweagansUpdating tags per http://drupal.org/node/1517250