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.
So currently we have this code determining what is displayed for an empty path in the edit UI.
$path = strip_tags('/' . $this->getOption('path'));
if (empty($path)) {
$path = t('None');
}
Because a '/' is always appended to the path, it's never empty. So for an empty path we are just left with the '/' character.
Comment | File | Size | Author |
---|---|---|---|
#19 | views-path-change-1831142-19.patch | 993 bytes | mducharme |
#17 | views-path-change-1831142-17.patch | 1000 bytes | mducharme |
#11 | drupal-1831142-11.patch | 2.1 KB | dawehner |
#7 | before.png | 7.66 KB | dawehner |
#7 | after.png | 22.56 KB | dawehner |
Comments
Comment #1
damiankloip CreditAttribution: damiankloip commentedHere is a patch with the text changed to 'No path defined', based on the Views usability study feedback.
We should probably add a test for this too.
Comment #2
dawehnerThis looks perfect
I guess screenshots would show how great this actual improvement is.
Comment #3
Bojhan CreditAttribution: Bojhan commentedYhea, this is a bit of an unwritten rule. But we generally really like to have screens before UX improvements are RTBC, just to provide that last check.
I would love if we can actually not use "defined", and just say "No path is set"
Comment #4
Bojhan CreditAttribution: Bojhan commentedComment #5
damiankloip CreditAttribution: damiankloip commentedSounds good to me!
Comment #6
damiankloip CreditAttribution: damiankloip commentedComment #7
dawehnerFine, here is one.
Comment #8
Bojhan CreditAttribution: Bojhan commented:)
Comment #9
lisarex CreditAttribution: lisarex commentedToo late now, but +1 from me. This came up in 2 of my sessions. Plus '/' is a tiny target area!
Comment #10
catchIs this worth adding a test for per #2?
Comment #11
dawehnerLet's do it, you never know.
Comment #12
catchCommitted/pushed to 8.x, thanks!
Comment #13
k.skarlatos CreditAttribution: k.skarlatos commentedWill this get ported to 7.x?
Comment #14
Bojhan CreditAttribution: Bojhan commentedNo reason it cant
Comment #15
Bojhan CreditAttribution: Bojhan commentedComment #16
dawehnerGood point! That is nothing really complicated to implement.
Comment #17
mducharme CreditAttribution: mducharme commentedDrupal 7 backport ready for review.
Comment #18
dawehnerLet's not backport the test unless someone is willing to take the effort.
We shouldn't introduce that whitespace here.
Comment #19
mducharme CreditAttribution: mducharme commentedThanks for spotting that. I've updated the patch to remove the extra whitespace. Patch applies without warning now.
Comment #20
k.skarlatos CreditAttribution: k.skarlatos commentedThanks. Its seems to work ok for me, it applies and works fine without any warnings or errors.
Comment #21
dawehnerAwesome! Committed and pushed