1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-27 01:02:42 +01:00
phorge-phorge/webroot/rsrc/css/phui
epriestley 68b1dee139 Replace the "Choose Subtype" radio buttons dialog with a simpler "big stuff you click" sort of UI
Summary:
Ref T13222. Fixes T12588. See PHI683. In several cases, we present the user with a choice between multiple major options: Alamnac service types, Drydock blueprint types, Repository VCS types, Herald rule types, etc.

Today, we generally do this with radio buttons and a "Submit" button. This isn't terrible, but often it means users have to click twice (once on the radio; once on submit) when a single click would be sufficient. The radio click target can also be small.

In other cases, we have a container with a link and we'd like to link the entire container: notifications, the `/drydock/` console, etc. We'd like to just link the entire container, but this causes some problems:

  - It's not legal to link block eleements like `<a><div> ... </div></a>` and some browsers actually get upset about it.
  - We can `<a><span> ... </span></a>` instead, then turn the `<span>` into a block element with CSS -- and this sometimes works, but also has some drawbacks:
    - It's not great to do that for screenreaders, since the readable text in the link isn't necessarily very meaningful.
    - We can't have any other links inside the element (e.g., details or documentation).
  - We can `<form><button> ... </button></form>` instead, but this has its own set of problems:
    - You can't right-click to interact with a button in the same way you can with a link.
    - Also not great for screenreaders.

Instead, try adding a `linked-container` behavior which just means "when users click this element, pretend they clicked the first link inside it".

This gives us natural HTML (real, legal HTML with actual `<a>` tags) and good screenreader behavior, but allows the effective link target to be visually larger than just the link.

If no issues crop up with this, I'd plan to eventually use this technique in more places (Repositories, Herald, Almanac, Drydock, Notifications menu, etc).

Test Plan:
{F6053035}

  - Left-clicked and command-left-clicked the new JS fanciness, got sensible behaviors.

Reviewers: amckinley

Reviewed By: amckinley

Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam

Maniphest Tasks: T13222, T12588

Differential Revision: https://secure.phabricator.com/D19855
2018-12-10 14:59:18 -08:00
..
button Allow Phriction document edits to be saved as drafts 2018-09-12 13:30:40 -07:00
calendar Add an Experimental Dark Mode to Phabricator 2017-07-18 06:44:32 -07:00
object-item Replace the "Choose Subtype" radio buttons dialog with a simpler "big stuff you click" sort of UI 2018-12-10 14:59:18 -08:00
workboards Add an Experimental Dark Mode to Phabricator 2017-07-18 06:44:32 -07:00
phui-action-list.css Add "Mute/Unmute" for subscribable objects 2018-02-08 11:06:22 -08:00
phui-action-panel.css Add setImage to PHUIActionPanelView 2017-07-30 13:20:26 -07:00
phui-badge.css Build a Badges page for Profiles 2017-02-24 13:15:42 -08:00
phui-basic-nav-view.css Align sidenavs better, use sky to highlight 2017-08-28 16:36:41 -07:00
phui-big-info-view.css Allow images to be used with PHUIBigInfoView 2017-08-03 18:56:19 -07:00
phui-box.css Make bulk editor working set editable and more homogenous 2018-01-19 12:39:27 -08:00
phui-bulk-editor.css Restore bulk edit support for remarkup fields (description, add comment) 2018-01-19 12:45:34 -08:00
phui-chart.css Swap charts from gRaphael to D3 2016-02-01 10:36:59 -08:00
phui-cms.css Rough in of NUX Guide steps 2016-08-20 14:05:12 -07:00
phui-comment-form.css Lots of little fixes for Dark Mode (Experimental) 2017-07-19 14:41:23 -07:00
phui-comment-panel.css Hide badges in phui-comment-panel 2016-12-02 11:02:53 -08:00
phui-crumbs-view.css Allow navigation breadcrumbs to be marked as "always visible" so they show up on phones 2018-05-09 13:21:47 -07:00
phui-curtain-view.css Make PHUITwoColumnView a little more printable 2017-09-25 19:56:22 +00:00
phui-document-pro.css Add an explicit "max-width" to PHUIDocumentPro pages to force large tables to scroll 2018-10-01 13:15:59 -07:00
phui-document-summary.css Add an Experimental Dark Mode to Phabricator 2017-07-18 06:44:32 -07:00
phui-document.css Add a UI element for navigating between versions of a Phriction document 2018-08-29 13:49:15 -07:00
phui-feed-story.css Remove box-shadow from feed story actors 2016-10-11 11:15:02 -07:00
phui-fontkit.css Add an Experimental Dark Mode to Phabricator 2017-07-18 06:44:32 -07:00
phui-form-view.css Allow Phriction document edits to be saved as drafts 2018-09-12 13:30:40 -07:00
phui-form.css Fix Firefox select dropdowns, maybe 2017-07-27 19:24:12 -07:00
phui-head-thing.css Update Diffusion UI 2016-03-17 12:05:14 -07:00
phui-header-view.css Allow DocumentView to render with a curtain, and make Phriction use a curtain 2018-08-28 14:58:05 -07:00
phui-hovercard.css Improve text overflow behavior for hovercards with (for example) long package names 2018-11-15 20:43:10 -08:00
phui-icon-set-selector.css Add more color/CSS to phui-icon-selector 2017-02-04 10:13:32 -08:00
phui-icon.css Show revision sizes using a perplexing, inexplicable symbol code 2018-04-03 12:49:27 -07:00
phui-image-mask.css Move rgba rules into CelerityDefaultPostprocessor 2016-02-16 09:54:43 -08:00
phui-info-view.css Fix info view error layout in config boxes 2017-09-07 14:09:03 -07:00
phui-invisible-character-view.css Add an Experimental Dark Mode to Phabricator 2017-07-18 06:44:32 -07:00
phui-left-right.css Update Diffusion File UI for single column 2017-08-21 13:35:25 -07:00
phui-lightbox.css Add an Experimental Dark Mode to Phabricator 2017-07-18 06:44:32 -07:00
phui-list.css Add an Experimental Dark Mode to Phabricator 2017-07-18 06:44:32 -07:00
phui-object-box.css Attach Diffusion Pagers to their ObjectBoxView 2017-04-21 11:22:19 -07:00
phui-pager.css Add a selected color state to PHUIPagerView 2017-06-06 17:00:39 -07:00
phui-pinboard-view.css Add an Experimental Dark Mode to Phabricator 2017-07-18 06:44:32 -07:00
phui-property-list-view.css Add "max-width: 100%;" to stop large images from overflowing the new rendering engine UI 2018-06-01 14:53:10 -07:00
phui-remarkup-preview.css Clean up Remarkup Preview on mobile 2017-04-17 22:11:08 +00:00
phui-segment-bar-view.css Redesign Home/Profile/Projects side navigation 2017-01-31 08:59:01 -08:00
phui-spacing.css PHUIButtonView class 2013-06-12 18:23:35 -07:00
phui-status.css New icons, colors for per reviewer status 2016-05-01 12:52:40 -07:00
phui-tag-view.css Add an Experimental Dark Mode to Phabricator 2017-07-18 06:44:32 -07:00
phui-timeline-view.css Remove the caret dropdown from transaction lists when no actions are available 2018-01-29 15:14:59 -08:00
phui-two-column-view.css Make PHUITwoColumnView a little more printable 2017-09-25 19:56:22 +00:00