WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 20 months ago

#13313 closed defect (bug) (fixed)

WP import: "Upload file and import" should be deactivated until a filename is entered

Reported by: lloydbudd Owned by:
Milestone: WordPress.org Priority: low
Severity: minor Version: 3.0
Component: Import Keywords: has-patch
Focuses: Cc:

Description

WP import: "Upload file and import" should be deactivated until a filename is entered

ENV: WP trunk 3.0-beta2-14526
Mac OS / Firefox 3.6.3

Additional Details

Same issue with wp-admin/media-new.php (browser upload)

Attachments (1)

common.dev.js.diff (528 bytes) - added by fandasson 3 years ago.
I'm not sure wheter common.js is the right place for this. But I didn't want to put it directly into template.php

Download all attachments as: .zip

Change History (13)

comment:1 @ocean905 years ago

  • Type changed from defect (bug) to feature request

-1:

Can't find a good reason for that. Rather a useless line of javascript than an advantage. And then we need a JS and no-JS version.

comment:2 @lloydbudd5 years ago

  • Type changed from feature request to defect (bug)

ocean90, thanks for the feedback.

You think it is a good user experience to have enabled a button that shouldn't be clicked? (bug)

Maybe, I'm missing an implementation detail, but the improved experience would only be appropriate for JS enabled, and it would be trivial to degrade gracefully (the current behavior).

comment:3 follow-up: @ocean905 years ago

  • Keywords ux-feedback ui-feedback added; import wxr file selector removed

Then we should use it on every page.

  • on Updates page, don't show the button Update plugins, if no plugin is selected
  • on pages with a search, don't show the button Search, if nothing is typed in for a search
  • on Add new (post/page), don't show the button Publish/Updaten, if noting has changed
  • ...

So it's not really a bug, that's the UI.

comment:4 in reply to: ↑ 3 @lloydbudd5 years ago

Replying to ocean90:

Then we should use it on every page.

  • on Updates page, don't show the button Update plugins, if no plugin is selected
  • on pages with a search, don't show the button Search, if nothing is typed in for a search
  • on Add new (post/page), don't show the button Publish/Updaten, if noting has changed
  • ...

Those are interesting ones as well, though don't stand out for me in the same way because those are all pages with many potential work flows. If disabling there could be done *extremely* elegantly as well, then it should -- but I suspect the current browsers would result in a sometimes less than polished experience.

comment:5 @jane5 years ago

This is already marked as future release, so we can look at the overall experience issue and try to fix it across the board. We're trying to hit RC1 in 2 days, and I wouldn't call this a blocker.

comment:6 follow-up: @dangayle5 years ago

The "disabled" HTML form attribute exists exactly for this, and should be a trivial bit of js to add. The disabled attribute is supported in all major browsers.

W3C HTML 4.01 - 17.12 Disabled and read-only controls

In contexts where user input is either undesirable or irrelevant, it is important to be able to disable a control or render it read-only. For example, one may want to disable a form's submit button until the user has entered some required data.

Note. The only way to modify dynamically the value of the disabled attribute is through a script.

comment:7 in reply to: ↑ 6 @dangayle5 years ago

Replying to dangayle:

The "disabled" HTML form attribute exists exactly for this, and should be a trivial bit of js to add. The disabled attribute is supported in all major browsers.

Sorry, I should have said disabling a form element is trivial. Determining if it should be disabled is another thing altogether.

comment:8 @dangayle5 years ago

  • Cc dangayle added

@fandasson3 years ago

I'm not sure wheter common.js is the right place for this. But I didn't want to put it directly into template.php

comment:9 @fandasson3 years ago

  • Cc fandasson added
  • Keywords has-patch added

comment:11 @SergeyBiryukov3 years ago

  • Milestone changed from Future Release to WordPress.org

For importers, moving to WordPress.org milestone.

For similar behaviour throughout the core UI, new tickets should be created.

Version 0, edited 3 years ago by SergeyBiryukov (next)

comment:12 @helen20 months ago

  • Keywords ux-feedback ui-feedback removed
  • Resolution set to fixed
  • Status changed from new to closed

Any form that has a class of .wp-upload-form and a file input keeps the submit button disabled until something has been selected. Looks like the WP and MT/TypePad importers are fine. This doesn't apply to the ones that use APIs for importing, and the OPML one is... well, it needs some love all around. Going to close this as fixed.

Note: See TracTickets for help on using tickets.