Over on #2056089: UI problems on the Modules/Extend page we are working on fixing up the UI for filtering on the Modules/Extend page (as well as other UI issues on that page).
The conclusion we came to on comment #80 on that issue also applies to the Views list page (see comment #75 on that issue.
This pertains to the Search/Filter page on admin/structure/views. What we need to do there is:
a) Remove the description on the filter field.
b) Remove the field label (visually hide it)
c) Add placeholder text saying "Filter by view name or description" or "Filter by view name/description"
The patch on #81 on the other issue can probably be used as a guide, although it does a lot more to the modules page than just these changes.
This is probably a good Novice project?
Screenshots:
Before:
After:
Beta phase evaluation
Unfrozen changes | Unfrozen because it only changes translatable strings. |
---|---|
Prioritized changes | The main goal of this issue is user experience and accessibility |
Disruption | Disruptive for core because there's no consistence UI for this |
Comment | File | Size | Author |
---|---|---|---|
#59 | 2380117-59-complete.patch | 775 bytes | tadityar |
#49 | 2380117-49-complete.patch | 2.19 KB | monobasic |
#49 | 2380117-49-test.patch | 1.43 KB | monobasic |
#46 | 2380117-46.patch | 2.33 KB | monobasic |
#36 | Screen Shot 2015-01-17 at 12.04.00 PM.png | 174.57 KB | markfelton |
Comments
Comment #1
moymilo CreditAttribution: moymilo commentedAdd this fixe's:
a) Remove the description on the filter field.
b) Remove the field label (visually hide it)
c) Add placeholder text saying "Filter by view name"
Comment #3
moymilo CreditAttribution: moymilo commentedComment #5
moymilo CreditAttribution: moymilo commentedComment #6
jhodgdonAh, my mistake.
It seems that the filter on the Views page goes by both the view name and the view description.
This is the same problem we're running into on #2056089: UI problems on the Modules/Extend page in the latest comments (#82, 84, 85). I'm not sure how we should resolve it, but the placeholder text is not accurate.
Also, one other change here: the visually-hidden "Search" label on the filter field should be changed to "Filter".
Comment #7
er.pushpinderrana CreditAttribution: er.pushpinderrana commentedAs per https://www.drupal.org/node/2056089#comment-9372491, made changes, please review once.
Comment #8
dawehnerLet's add some screenshot to see what is going on before and after.
Having some accessibility review would be also great here.
Comment #9
jhodgdonYeah we should verify that the fact that the list has been filtered is announced in the same way it is now on the Extend page.
Comment #10
jhodgdonAs on the other issue, this filters by both the view name and description. So I think we need to change the placeholder text to "Filter by name/description".
Comment #12
hussainwebChanging as per #10.
Comment #13
jhodgdonThanks! This is probably fine, although I think we could use shorter placeholder "Filter by name/description" instead of "Filter by view name or description". Either way is probably fine, as long as the longer text fits in the box.
So, what we need here:
- Before and after screen shots
- Maybe we should test this with all available Core themes as the admin theme, to make sure the placeholder text fits in the box no matter what theme is used?
- Someone needs to do an accessibility test. We need to make sure that when filtering happens, screen readers are "announcing" that the list of views has changed.
- Before we'll be able to commit this patch, we'll need a "Beta phase evaluation" block added to the issue summary. See https://www.drupal.org/contribute/core/beta-changes for instructions.
Comment #14
lefeeza CreditAttribution: lefeeza commentedI am making screenshots
Comment #15
tadityar CreditAttribution: tadityar commentedI've done an accessibility testing using Mac's VoiceOver. I don't hear any announcement when I type in the filter but it's also like that before the patch is attached.. so I think it's not the patch's fault.
Below is the screenshot
Before
After
Comment #16
tadityar CreditAttribution: tadityar commentedComment #17
tadityar CreditAttribution: tadityar commentedadded beta evaluation and minor change, please correct me if I'm wrong.
Comment #18
jhodgdonThanks for testing! If the "announce" isn't working, then that should be fixed in this issue.
Comment #19
manvendrakot CreditAttribution: manvendrakot commentedCss changes for the #12
Comment #20
monobasic CreditAttribution: monobasic commentedI don't think it's a good idea to solve the width problem on a specific css base here - the original elements width was defined through the size="30" attribute on the input, so maybe it would be better to tweak the size there.
Apart from that the introduced max-width is already applied from form.css styles.
In general - shouldn't this width issues discussed/solved one level higher and style all instances of the filters in the same way?
Comment #21
monobasic CreditAttribution: monobasic commentedComment #22
YesCT CreditAttribution: YesCT commentedThank you for working on this issue.
We should all try and use the same sprint tag. According to https://groups.drupal.org/node/447258 it should be SprintWeekend2015 with no #.
Comment #23
idebr CreditAttribution: idebr commentedLooks great!
I don't think these changes should be in this patch?
Comment #24
monobasic CreditAttribution: monobasic commentedComment #25
vaibhavjainPatch looks good now.
Comment #26
idebr CreditAttribution: idebr commented#23 has not yet been addressed.
Comment #27
tadityar CreditAttribution: tadityar commenteddeleted the change
Comment #31
joscartesar CreditAttribution: joscartesar commented#SprintWeekend2015
I realise that the patch doesn't apply. I'm going to reroll it
Comment #32
joscartesar CreditAttribution: joscartesar commentedMy first contribution/patch!
#SprintWeekend2015
Reroll done
Comment #33
penyaskitoThanks everyone working on this!
Removed the Needs reroll tag.
Also added Needs screenshots tag. We should update the issue summary with screenshots *before* the patch and *after* the patch.
See tips for adding screenshots.
Comment #34
markfelton CreditAttribution: markfelton commentedReviewing this now for #SprintWeekend2015
Comment #35
joscartesar CreditAttribution: joscartesar commentedComment #36
markfelton CreditAttribution: markfelton commentedScreenshot showing placeholder text, still needs accessibility review
Comment #37
penyaskitoUpdated IS with screenshots.
Comment #38
monobasic CreditAttribution: monobasic commentedGood idea with the screenshots, Patch: 2380117-32-reroll.patch works fine here..
Comment #39
penyaskito@monobasic Thanks for testing it!
I guess this needs automatic testing now, then?
Comment #40
monobasic CreditAttribution: monobasic commentedNever did one, but I am happy to try! Maybe you could give me some startup advice: What would be senseful to test in this case? Test for the proper markup and the text of the placeholder? And would be the test for views list case only?
Comment #41
markfelton CreditAttribution: markfelton commentedComment #42
illeace CreditAttribution: illeace commentedI also tested the patch and it worked for me and does all three things listed in the original write-up.
Comment #43
penyaskito@monobasic Thanks for volunteering!
What I would do is creating a
ViewsListFormWebTest
test class in the namespaceDrupal\views_ui\Tests
.If you look at
\Drupal\system\Tests\Form\ModulesListFormWebTest
as an example you have a test that checks for some HTML in the modules administration page.You should do something similar, but asserting that the filter textbox has the right size and texts. Just ensure that the
views_ui
module is enabled (see the$modules
array) and that you are accessing with a user with the right permissions (see thedrupalCreateUser
call).If you have any doubts don't hesitate to ask for help here or on IRC.
Comment #44
monobasic CreditAttribution: monobasic commentedcheers, looking into that...
Comment #45
dawehnerCommented in the beta evaluation :) Thanks for writing it.
Comment #46
monobasic CreditAttribution: monobasic commentedI've added the test, please review!
Not sure if I get the xpath part right - it seems to me that the input filter field should be targeted specifically, the way it is right now, the assertions just checking for a field containing the attr and value, is that correct? Thanks guys!
Comment #47
penyaskito@monobasic: Congratulations for your first test, thanks for contributing!
IMHO given xpath it is enough. If you can improve it with a more specific xpath query would be perfect, but not a requirement.
Some minor nitpicks:
system.test is not used, let's remove it from here. Then we can remove setUp() completely.
Those should have t() or they will fail if running tests in a translated version. t() is only used in testing when the strings inside it are part of the UI, but we still need it there.
Just a note: when rolling a patch for a bug with a test, it is really useful to upload two patches, one with only the test and one with the test and the fix. So the first one will fail, ensuring that we are fixing the right thing. See https://www.drupal.org/contributor-tasks/write-tests for concrete instructions.
Thanks again!
Comment #48
monobasic CreditAttribution: monobasic commented@penyaskito: Many thanks for your help, much appreciated :) I will include your suggestions and upload two separate patches..
Comment #49
monobasic CreditAttribution: monobasic commenteddone and added new patches - please review, thanks!
Comment #51
penyaskitoPerfect, thanks!!
I would mark this as RTBC, but we still need an accessibility review. I would try to get someone from the team here.
Comment #52
penyaskito"I would" means that I shouldn't have changed status.
Comment #53
opdaviesI can take a look at it from an accessibility perspective. I'm travelling home at the moment, but I'll take a look and update with another comment ASAP.
Comment #54
dawehnerNice!
Comment #55
alexpottThe change looks good but...
Here we are just testing features of the form API. I think this test is not really testing anything. And therefore shouldn't exist.
Comment #56
monobasic CreditAttribution: monobasic commentedThanks for the review. The test was mentored and approved by @penyaskito, so I don't really know what to do here -> status back to unassigned
Comment #57
dawehnerI have to agree with @alexpott, ... we don't have any logic which has to be tested here. Adding the test coverage would just make it more complex to change the labels etc. later, if wanted.
Comment #58
penyaskitoOK, so what's next? Using #32? I guessed that having that test would be better than nothing.
Comment #59
tadityar CreditAttribution: tadityar commentedThis is the complete patch in #49 with suggested removal of some assertions in #55.
Comment #60
penyaskitoRTBC per #54 and #57.
Comment #61
alexpottUI text is not yet frozen. Committed 7b64a0a and pushed to 8.0.x. Thanks!