Problem/Motivation

When adding a new view (/admin/structure/views/add) I have to select a base table from a list (labeled "Show:"). The default, "Content", is appropriate, but the other options can be overwhelming. It would help if they were sorted.

See the "User interface changes" section for a screenshot from the Standard profile. On a moderately complicated site, it can be much worse.

Steps to reproduce

  1. Visit /admin/structure/views/add.
  2. Open the Select list labeled "Show:".
  3. Note that the options are not in any particular order.

Proposed resolution

After #3065903: Add label sort ability to Select element, it is very easy to sort the options in a Select list. Just add '#sort_options' => TRUE, to the right form element in Drupal\views_ui\ViewAddForm.

Remaining tasks

User interface changes

Before:

Select element with unsorted options

After:

Select element with sorted options

API changes

None

Data model changes

None

Release notes snippet

N/A

Comments

benjifisher created an issue. See original summary.

benjifisher’s picture

I believe that the test coverage in #3065903: Add label sort ability to Select element is good enough that we can just use the new sort_options attribute here without adding any new tests.

adityasingh’s picture

Status: Active » Needs review
StatusFileSize
new584 bytes

Just add '#sort_options' => TRUE,
Sort the options in a Select list. Please review.

benjifisher’s picture

@adityasingh:

According to your profile, you have 19 issue credits in the last year, including 4 for Drupal core. I tagged this issue "Novice" so that a new contributor could learn how to work on an issue without needing a lot of expertise. Do you still consider yourself a novice? Did you learn anything while working on this issue?

abhijith s’s picture

StatusFileSize
new29.15 KB
new29.24 KB

Applied patch #3 and it works fine.The list labelled Show is sorted now in the views.
Adding screenshots below

Before patch:
before
After patch:
after

abhijith s’s picture

Status: Needs review » Reviewed & tested by the community
adityasingh’s picture

Hi benjifisher
I am not sure about novice definition but absolutely this is minor issue, will take care in future.

Thanks.

ishanmahajan’s picture

Hi @benjifisher:

I am slightly uncomfortable with this line of questioning, towards an individual's choice of contribution. One should not have to declare their expertise level or mention what they "learned" while contributing to our community.

As a community, we welcome all contributions, no matter how simple or complex they are. My last core contribution was a link to India's constitution, on a Core issue discussing wether we include "Caste" in the Drupal code of conduct or no. It took me 5 minutes and I did NOT learn anything new, but I believe it helped make progress.

Sometimes one may choose to pick a simple issue as that is all they can afford to pick, in the limited time that they volunteer towards open source.

Please don't get me wrong, I would also like new contributors to get the opportunity to work on novice issues. But personally, I am not in favor of discouraging others who may feel more comfortable with Novice issues. As how would you judge a newcomer? I have been on D.O for over 10 years and can probably not submit a patch more complex than what this issue warranted. Coding is not what I do professionally.

If you still feel strongly about this, I will recommend you open an issue to update the contribution guide and the issue etiquettes page to put guidelines around who should pick Novice issue, and see if the larger community feels the same way as you.

Questioning an individual on their choice of contribution, feels like gatekeeping to me.

Thank you for hearing me out and thanks for all your contributions.

quietone’s picture

@adityasingh, just in case you haven't found it yet the explanation, such as it is, for the tags, including 'Novice' are at Issue tags -- special tags. There may be more elaborate descriptions elsewhere but I like the concise definition that tag page offers.

volkswagenchick’s picture

This discussion appears to discourage contribution from some participants. It can also discourage folks that are new to a topic or concept from speaking up or reaching out for help. Consider providing the new contributor with links to help them learn the topic or concept. ( issue queue etiquette and tags)

For more information, please refer to Drupal’s Values and Principles #3 of fostering a learning environment: long-term contributors should be role models by admitting their own shortcomings and mistakes, being vulnerable, and by giving others the same respect that was once given to them.

Principle #9 can also be useful here: be constructively honest, and relentlessly optimistic. You can be optimistic and supportive by giving suggestions for how to improve their contributions. By being helpful, you encourage people to accept feedback and act on it.

https://www.drupal.org/about/values-and-principles

This comment is provided as a service (currently being tested) of the Drupal Community Health Team as part of a project to encourage all participants to engage in positive discourse. For more information, please visit https://www.drupal.org/project/drupal_cwg/issues/3129687

benjifisher’s picture

Issue tags: -Novice

Thanks for the feedback, @ishanmahajan and @volkswagenchick. From now on, when I add an issue specifically for first-time contributors, I will say so in a comment rather than rely on the Novice tag.

Now that the Novice task has been done, I am removing the tag.

+1 for RTBC.

benjifisher’s picture

When I created this issue, I looked for existing issues, but I guess I did not look hard enough: this issue is a duplicate of #2932016: Entity names in the 'add view' form are unsorted.

The approach used in this issue, taking advantage of #3065903: Add label sort ability to Select element, is simpler than the approach used in the other issue. Most of the effort in the other issue is for the related test. As I said in #1 here,

I believe that the test coverage in #3065903: Add label sort ability to Select element is good enough that we can just use the new sort_options attribute here without adding any new tests.

If no one objects, then I will close the other issue as a duplicate and transfer the issue credits to this one.

alexpott credited Lendude.

alexpott credited joachim.

alexpott’s picture

alexpott’s picture

Version: 9.2.x-dev » 9.1.x-dev
Category: Task » Bug report
Status: Reviewed & tested by the community » Fixed

This is a UX bug.

Committed and pushed 84b1d18bfc to 9.2.x and 6ab8e5e693 to 9.1.x. Thanks!

  • alexpott committed 84b1d18 on 9.2.x
    Issue #3183106 by adityasingh, benjifisher, Abhijith S, Kumar Kundan,...

  • alexpott committed 6ab8e5e on 9.1.x
    Issue #3183106 by adityasingh, benjifisher, Abhijith S, Kumar Kundan,...
benjifisher’s picture

Sorry, I never followed up on my suggestion.

Correction: the credits added to this issue were transferred from #2932016: Entity names in the 'add view' form are unsorted.

Status: Fixed » Closed (fixed)

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