Decide on the new UI for the following issue

#2914759: Proposal to use Lit / web components for building Drupal’s administrative UIs
#2913628: Proposal to use Vue.js for building Drupal’s administrative UIs
#2913321: Proposal to experiment with React for building Drupal’s administrative UIs

Link to Balsamiq doc https://drive.google.com/open?id=0B795pTGHJsoxbmh4Zno3Szhkb28

Proposal

Stage 1

1. Create a version of Drupal's /admin/reports/dblog in the framework / solution of choice.
2. Demonstrate how it is possible to override the themeable output.
3. Report on important issues of flexibility, performance and extensibility

Stage 2

1. Demonstrate options for enhancement from the ecosystem that the framework / solution of choice can tap into.
2. Demonstrate alterations to the original design to include elements of:
a) content expansion, "expand-in-place"
b) Search box / filtering
c) active updates for log messages, "polling", Twitter-style "X new log messages" user interactions.

It was recommended that the page could be converted to be read only by remove form API actions that would allow you to select and delete log entries.

## Initial page load

- Show 50 logs lines
- Sorted by date DESC
- Not filtered by type
- Not filtered by severity

## Features

- Filtering is using the Facet approach, so you can combine multiple types and/or severities
- Filters has a "Show all" button when needed (reset filter)
- There's a reset button to clears the complete log
- Individual log lines can be removed
- All visible lines can easily be selected
- Add a search to search inside the message

## State

If the user returns to the page it's filtered like it was when the user left the page

Copied from #2913321-75: Proposal to experiment with React for building Drupal’s administrative UIs

CommentFileSizeAuthor
#21 dblog3.png62.97 KBattiks
#19 bdlog_ui_v2.png65.59 KBattiks
#2 DB Log UI.bmpr_.txt64 KBattiks
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

attiks created an issue. See original summary.

attiks’s picture

FileSize
64 KB

Attaching Balsamiq file

Chi’s picture

What is the use case for removing individual log entries?

droplet’s picture

One of the most important parts is to demonstrate "UI overriding/extending" (the Drupal Core way, don't kill a kitten. and no NODEJS on server side). It demonstrated how to avoid overhead (on the resources loading).

Other parts, we can checkout TodoMVC & HackerNewsClones to do a comparison.

my list
- demonstrate Theme part
- demonstrate Routing
- demonstrate overriding/extending

Not in my list:
- (CRUD really not a must IMO, checkout TodoMVC)

1 demo for normal module UI
1 demo for overriding/extending the UI above

attiks’s picture

#3 Good question, was just as an example, but might come in handy for people to removed one/sone logs without the need to clear the whole log. I'll remove it when I have the time to update.

#3 Very good points, thanks

kevinquillen’s picture

How about an enhancement that lets you select 1 log item, and add a 'solution' to it (be it an admin note + link to d.o or StackExchange), permanently store that log item and in the future, flag matching error messages in the UI as having a potential previous fix. This would add some interactivity beyond the basic filters we already know, add a useful feature, and per Chi's comment - store a log item for reference as an action.

neclimdul’s picture

Awesome. Very exciting.

The cooler side of my brain is reminding me that the React issue is allowing comments till the 23rd and we should be mindful of that and the process the core team set forward before rushing too far though.

webchick’s picture

Discussed this issue on today's UX meeting. Recommendations were:

  • A "stage 1" version that just recreates admin/reports/dblog seems like a good place to start. Key things to look for: what does it mean to override core's output? what it means to provide themeable output from a JS framework? (Basically, what @droplet said.)
  • The "stage 2" having improvements over the existing UI:
    • Show off what these libraries supply out of the box (or with a popular add-on) for the multiselect pattern? (e.g. pills/buttons?) Core uses the HTML version which is pretty awful UX.
    • Also explore alternatives for "expand-in-place" functionality for longer entries that get cut off with "..." (currently just uses the 'title' attribute on the link)
    • Search box: Filtering the results by keyword without a server refresh.
    • Auto-update as new logs are created as you're looking at the page (suggestion was to use Twitter's "X new log messages" pattern that can be expanded to include them)

Also, from our understanding, the Form API parts are a whole rats' nest, which is why this screen was chosen vs. something like admin/content. So would recommend descoping the bulk select + delete items from the prototype.

webchick credited benjy.

webchick credited yoroy.

webchick’s picture

Adding @yoroy and @benjy to the credit list for this issue, since they were part of the above discussion.

cosmicdreams’s picture

Issue summary: View changes
cosmicdreams’s picture

Issue summary: View changes
droplet’s picture

Also,

A fair comparison should use SAME THEME MARKUP as the current DBlog without Views classes. Or the same markup structure. For example, web components may use CUSTOM-TR represents tr tag is acceptable. (But try to avoid it IMO)

Less or More markups, we should count that as framework limitations. (e.g. what @effulgentsia cares #2909481: JavaScript VDOM library evaluation: components returning multiple root nodes.)

Seems like we have to close this first, haha: #2915314: No spaces on icons' classes

benjy’s picture

Discussed this issue on today's UX meeting.

I wasn't part of that discussion :) - maybe you confused me with someone else?

dawehner’s picture

As part of playing around with my solution in elm I realized the following bits:

  • Search box: Filtering the results by keyword without a server refresh.

    This has an issue to be actually practically useful. You want to filter quickly the entries you currently see, but then have also an HTTP request running in the background fetching additional entries which are valid for your current filter criterias.

  • Auto-update as new logs are created as you're looking at the page (suggestion was to use Twitter's "X new log messages" pattern that can be expanded to include them)

    I think its really nice to provide something like acquia's hosting interface, aka. new messages are streamed in, so you can see them directly,
    especially helpful if you filter by severity. This is totally possible, but it requires work on the server side though.

At least for me I have no doubt that any framework/approach can filter/sort nice, can apply things in real time and what not, but I think the actual problems are:

  • Themeablity
  • How do multiple apps pages work together (do they have to?)
  • Is something like a form alter still needed?
  • How do modules hook into the process and provide additional functionality?
  • How maintainable do these approaches end up with? Something which looks maybe verbose now, might provide long term benefits

webchick’s picture

Oops, my bad. :D Sorry, @benjy!

attiks’s picture

FileSize
65.59 KB
attiks’s picture

#8 Link to the UX meeting video: https://www.youtube.com/watch?v=KJ9QMjX2PWI around 16 minutes

attiks’s picture

Issue summary: View changes
FileSize
62.97 KB

Added real values for filters, keep in mind that type might be a real long list

cosmicdreams’s picture

@Attiks I think we want to exclude the "Clear all logs" button from the design you posted.

dawehner’s picture

The show all logs button seems also quite, well let's say, not really working in reality :)

fgm’s picture

Something I did not seem mentioned is the fact that this UI should both /also/ work with JS disabled and remain accessible, should it not ? Not sure whether this goes on this issue or on the respective React/Vue/WC issues.

dawehner’s picture

At least for me the approach to do that would be to have a frontend router taking over the page completely, so the backend doesn't have to worry about that.

attiks’s picture

#24 I think none of the solutions work without javascript, also no idea what the consequences are for screenreaders.

fgm’s picture

#26 that's what I think too, and it means we do need to add a noscript behavior, which may impact what we put in the server-side markup, to enable these reactive behaviors as a progressive enhancement.

tacituseu’s picture

Make them use Views on server side for filtering and getting results (REST export).
/ducks ;)

marcvangend’s picture

re #24 - #27: We had a blind person in our office recently, demoing his screen reader. We didn't get into much detail on the topic of JS, but the takeaway was that screen readers do support JS (http://a11yproject.com/posts/myth-screen-readers-dont-use-javascript/). You do have to take care of accessibility when building your application though; here's a good article on client-rendered accessibility.

I'm not sure if the choice for a JS framework (React, Vue, whatever) makes much difference when it comes to accessibility. It's mainly a matter of generating semantic, accessible HTML, placing ARIA attributes where needed, and JS for managing focus and notifying the user when content is dynamically updated. Every framework should be able to do that, I suppose... But I might be wrong.

andrewmacpherson’s picture

Re: #29 - thanks @marcvangend, that's pretty much correct.

Tagging this for review later on, but I think much of the accessibility review will be done as part of an implementation issue. So far, I haven't seen anything in this design that we can't convey in an accessible way. The exact approach can wait until we have a working code prototype.

For example, we'll need to convey something like "Now showing 8 results for type: PHP severity:warning", but whether to use Drupal.announce() or a dedicated ARIA live region is something we can decide later. A visible now-showing summary message might be useful too.

Similarly, we'll want to convey whether a particular filter is active while a user is focused on a button. Matching the visual style with aria-pressed is the typical way to achieve this. The new role="switch" from ARIA 1.1 may be appropriate too.

The designs don't show a waiting/thobber widget yet. Depending how that looks visually, we could:

  • Mark the table container as aria-busy, or
  • Treat a thobber icon as a dedicated aria-live region which announces "fetching.... done" messages, or
  • a combination of the above, or
  • something else.

WAI-ARIA 1.1 introduces an aria-current property, which can make the pagination links more robust. In fact, we could use that on pagers everywhere - see #2893640: Modernize ARIA usage, in line with ARIA 1.1 and the ARIA Authoring Practices guide..

screen readers do support JS

It's more accurate to say that web browsers support JS, and communicate changes in the DOM to screen readers. The screen reader isn't handling JS itself, just reporting what it gleans from the browser. There's a good overview of how screen readers work in Accessibility APIs: A Key To Web Accessibility from Smashing Magazine. In the modern way of doing things, the browser and assistive technology communicate with each other via an accessibility API provided by the OS. Some screen readers (e.g. JAWS) also still employ a historical approach to access the browser DOM directly, but modern browsers' security/sandboxing are moving to prevent this.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

nod_’s picture

Component: javascript » dblog.module
Issue tags: +JavaScript

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.