Problem/Motivation

I was noticing I had put in just abc123.cloudfront.net in the CDN mapping and didn't see any examples in the help text or any documentation of the format or recommendations. I took hints from #1115686: Add support for any type of file referenced in node bodies (currently only images) and the project homepage screenshot that it should have been with the protocol included.

http://abc123.cloudfront.net, the strange thing is the SSL mapping is on a different page and only shows up if you enable the support for it, but doesn't seem to need the mapping as long as that is checked off as SSL support the previous screen's http://abc123.cloudfront.net would be converted to https://abc123.cloudfront.net

Proposed resolution

  1. Move the SSL section below the mapping so the original mapping is in visual context.
  2. Explain the need of the protocol and how it will be replaced or allow for protocol less mappings(which may have previously worked)
  3. Explain the pattern in help text after the pipe |
  4. Explain what happens without the piped file extensions.

Remaining tasks

Decide which documentation pieces would be the right way forward.

User interface changes

Moving form fields to the same page.

API changes

Data model changes

Follow-up to #1115686: Add support for any type of file referenced in node bodies (currently only images)

Comments

joelpittet created an issue. See original summary.

wim leers’s picture

Category: Feature request » Support request
Status: Active » Postponed (maintainer needs more info)

help/admin-details-mode-pull-cdn-mapping.html already contains documentation for this. Did you install the Advanced Help module, like the CDN module encourages?

joelpittet’s picture

Why does it need the protocol if it just replaces it anyway?

joelpittet’s picture

Oh I avoid installing the advanced help module, it's hardly ever helpful and just one more module to install... I guess this may be the exception to the rule.

joelpittet’s picture

I feel with some simple examples in the #description, it would help people get up and running a bit quicker.

wim leers’s picture

#5: the whole point was to KISS, all those examples in the description make it super noisy. That's what the CDN module *used* to do (years ago) and then *that* was the problem :)

joelpittet’s picture

Yeah couldn't reproduce it working with what I had in the staging site.

KISS by installing another module to show help doesn't seem that simple.
I know they can be noisy, I use formtips to keep my UX tidy in admin from that noise.

Maybe even simply put some examples in a placeholder attribute to keep it cleaner?

And how about moving some of the 'Other' tab to the details? Is there a reason behind the separation?

wim leers’s picture

Yes, there is. 90% of people don't ever need to change something on the "Other" tab.

wim leers’s picture

And https://www.drupal.org/project/formtips is apparently used by a mere 317 sites.

All this is exactly why I want to remove the UI altogether in the Drupal 8 port. Let people just edit YML files. Perhaps a minimal UI that only allows this mapping to be entered, and then strictly validates it. Need anything more? Modify the YML file. For the discussion about that, see #2294613-6: Port CDN to Drupal 8.

joelpittet’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new6.62 KB

I collapsed the "Other fields" and moved them to "Details".

Added a very simple placeholder (apparently they don't take line breaks, learned something)

joelpittet’s picture

@Wim Leers formtips has some drawbacks, so I have a hacked version and offered to maintain it;)

joelpittet’s picture

minimal UI sounds nice, the least you need to get something up and working, and all the 'advanced' in yaml config sounds nice to me.

joelpittet’s picture

Issue summary: View changes
StatusFileSize
new45.83 KB

wim leers’s picture

#12:

minimal UI sounds nice, the least you need to get something up and working, and all the 'advanced' in yaml config sounds nice to me.

Very glad to hear that you too like that approach, that's the confirmation I was hoping to get :)


#10: Hm… I'm not sure I want to do that. That's a massive UI change. It's been like this for years. I don't think I want to overhaul the CDN UI, TBH.

joelpittet’s picture

The UI should really just try to deal with the 90% use-case as easily and efficiently as possible. (percentage made up:P) Complicating the UI with edge cases and 'features' doesn't help the advanced use-cases nor the simple ones.

re #10 how about maybe I just move the SSL mapping stuff to details and leave the other stuff? Easier transition... and thoughts on placeholder?

wim leers’s picture

Category: Support request » Task
Issue summary: View changes
StatusFileSize
new1.06 KB
new11.32 KB

You only need the SSL mapping if you have to use a different domain name for SSL. Most CDNs use the same domain name for both HTTP and HTTPS. So for most CDNs, entering a protocol-relative URL in the "standard" CDN mapping is sufficient.

Placeholder++.

What about this?

wim leers’s picture

Note that in D8, none of this is a problem anymore:

See #2294613-34: Port CDN to Drupal 8.

joelpittet’s picture

That looks like UI improvement for sure:)

  • Wim Leers committed 445b6cd on 7.x-2.x
    Issue #2667156 by joelpittet, Wim Leers: Add help text or documentation...
wim leers’s picture

Status: Needs review » Fixed

Thanks, @joelpittet! Committed #16.

Status: Fixed » Closed (fixed)

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