Problem/Motivation

The Add new page button on the list of Search pages admin/config/search/pages is inconsistent with other such buttons and vague. On other pages the usual format is Add foo: without the "new", and as a primary button. "Page" is also vague and could refer to any other type of page.

Proposed resolution

The button should be reworded as Add search page and then marked as a primary button.

Remaining tasks

User interface changes

This is a UI text change, so the hook_help text might need to edited as well.

API changes

Data model changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ifrik created an issue. See original summary.

Haza’s picture

Status: Active » Needs review
FileSize
1.92 KB

Here is a small patch that changes the link name.

Tests have been updated too.

We were already using the "new search page" in the hook_help as far as I can see.

ifrik’s picture

Status: Needs review » Needs work

Sorry,
I didn't notice that we also need to change another button for this to work consistently.

Once the user choose "Add search page" they get the usual form, and the a button that also says "Add search page". This should be then changed to "Save", similar to the buttons of other modules.

And any idea what triggers Bartik to add the "+" before as part of "Add foo" for other modules?

pashupathi nath gajawada’s picture

Assigned: Unassigned » pashupathi nath gajawada
Status: Needs work » Needs review
FileSize
2.64 KB

Hi @ifrik,

I have done the changes as suggested in #3.
Please find the patch which would fix this .

Thanks,

Status: Needs review » Needs work

The last submitted patch, 4: 2752915-4.patch, failed testing.

Haza’s picture

I think the bot is failling because of https://www.drupal.org/node/2572293#comment-11318935 (again, a PHP-FPM error). I can't ever tell how those tests are not failling on the other issues.

The last submitted patch, 4: 2752915-4.patch, failed testing.

mohit_aghera’s picture

Status: Needs work » Needs review
FileSize
3.41 KB
1.23 KB

Changing few titles in test file.

Status: Needs review » Needs work

The last submitted patch, 8: 2752915-8.patch, failed testing.

ifrik’s picture

Hi pashupathi nath gajawada,

Can you in future please provide an interdiff when you make a new version of patch? That way we can see what the differences are between one version and the next. In this case it would help us to see whether the patch fails due to something that was changed in your patch, or whether it fails for some other reason.

Also: please don't change the patch name if you build on somebody else's work. Otherwise it looks like for no apparent reason you started again from scratch. It's basic good practice and respect to other contributors.

chr.fritsch’s picture

Status: Needs work » Needs review
FileSize
3.73 KB

Start fixing the tests

ifrik’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
FileSize
14 KB
3.51 KB

Thanks,
the wording on both buttons is now changed to "Add search page" and "Save".

I will post a separate issue for the UX problem that a page type needs to be selected before adding a search page, but that problem exists independent of the wording of the button.

ifrik’s picture

webchick’s picture

Status: Reviewed & tested by the community » Needs review

Would be great to get some more complete before/after screenshots here, to help visualize the changes better. Also, I feel like this is part of a larger pattern, it'd be great to see the usability topic maintainers sign off on this. (If this already happened, a pointer to the issue comment is fine.)

webchick’s picture

Looked into this a bit more... here's the "before" screenshots btw, since I was there anyway.

Search form has Add new page as well as Save Configuration button
On the following page, the button is labeled Add search page

The two textual changes actually seem fine; "Add new page" is redundant, so "Add search page" seems better, and calling the save button on a single-purpose form "Save" is consistent with the rest of core. However, the change of the button to "primary" seems a bit controversial. First, because I'm not sure adding search pages is qualified as the "Primary" action on this page; there are many different field sets on this form. Secondly. because this creates two primary-styled buttons in very close proximity to one another, and we already have a big issue going on at #2520232: Separate the menu settings from the 'add link' button for a related problem with menu/taxonomy.

So I think if we re-roll this patch without the #primary change, the rest of this is probably good to go. And then, per xim, we should have a specific follow-up for changing the colour of the "add" button, along with a parent meta issue that describes the overall problem space of forms that allow you to add a thing and re-arrange a thing you just added on the same page. (The same issue would also be the parent of #2520232: Separate the menu settings from the 'add link' button).

webchick’s picture

Status: Needs review » Needs work
davic’s picture

Following #15 indications, it really seems that the primary type does not fit as well as we first tought for the button. This patch was made with all the name changes, but without the button type being primary.

davic’s picture

Status: Needs work » Needs review
webchick’s picture

Title: Rename "Add page" to "Add search page", make it a primary button » Rename "Add page" to "Add search page"
j2r’s picture

Assigned: Unassigned » j2r
j2r’s picture

Assigned: j2r » Unassigned
Status: Needs review » Reviewed & tested by the community

Last patch #17 is working as expected

On Search page the button text is : "Add search page"
and on "Add new search page" button text is : "Save"

Wim Leers’s picture

This is technically a BC break, but it seems low-risk.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 17: 2752915-17.patch, failed testing.

Wim Leers’s picture

Status: Needs work » Patch (to be ported)

A fail after two weeks of passing all tests, that's suspicious. Retesting.

webchick’s picture

Status: Patch (to be ported) » Reviewed & tested by the community

Assuming this was meant instead.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 17: 2752915-17.patch, failed testing.

davic’s picture

Status: Needs work » Reviewed & tested by the community

It feels like the fail is somewhat conditional of the test, as it fails suddenly. Rerolling to check again.

  • xjm committed 978b026 on 8.2.x
    Issue #2752915 by mohit_aghera, davic, Haza, pashupathi nath gajawada,...
xjm’s picture

Status: Reviewed & tested by the community » Fixed

@davic, thanks for updating the patch! (In the future, please provide an interdiff when you update patches to help reviewers.)

@Wim Leers:

This is technically a BC break, but it seems low-risk.

Per our BC policy, strings and user interface elements are considered "internal" API and may change in minor releases:
https://www.drupal.org/core/d8-bc-policy#strings
https://www.drupal.org/core/d8-bc-policy#render-array
https://www.drupal.org/core/d8-bc-policy#themes

So we are good on that front for 8.2.x.

The updated patch is now straightforward: It standardizes the final button text to "Save" (which is consistent with what's used elsewhere throughout core), and makes the confusing "Add new page" button text specific so users know what it does. Based on that, I think we have sufficient review and signoffs to commit the text improvements.

Committed 978b026 and pushed to 8.2.x. Thanks!

To further improve the parent form, including the design and button coloration/styling for "Add a thing" on a page of "Configure the parent thing", let's continue the discussion in a new issue that draws on the discussion here, in #2520232: Separate the menu settings from the 'add link' button, and in the other issues mentioned there.

Gábor Hojtsy’s picture

Issue tags: -sprint

Thanks, removing from UX sprint now.

  • xjm committed 978b026 on 8.3.x
    Issue #2752915 by mohit_aghera, davic, Haza, pashupathi nath gajawada,...

  • xjm committed 978b026 on 8.3.x
    Issue #2752915 by mohit_aghera, davic, Haza, pashupathi nath gajawada,...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.