Thanks for the module!
I found a way to use it with old browsers. I'm going to attach patch with some modifications. Among changes there are:
1) Change JS code and hooks in order to be used in old browsers.
2) Add message HTML into settings and make settings translatable, so instead of files we can manage it via UI and config translation.
3) Update settings form to use proper syntax and DI.
4) Fix permissions and newlines.
I'm not sure, whether these changes are good ones.

Comments

ilya.no created an issue. See original summary.

ilya.no’s picture

StatusFileSize
new17.16 KB
agoradesign’s picture

Hi,
thanks for your patch.

I'm only facing one problem with that: like you can see from the project status, I'm basically not working on this module any more. I'm not using it in any projects for a long time now already. But I'm already having a co-maintainer, Nor4a, who I'll contact for reviewing the patch.

The patch reads well. It deals with some early D8 mistakes I've made (not defining permissions yml, schema,...). That's a potential problem that it deals with several different issues all at once, but for a minimally maintained module, this may be rather an advantage in this case

Regarding permissions: the better one would have been not to change the permission but rather define it properly. But I'd accept that one too.

One thing I'm wondering, is, why old browsers would not handle the Drupal JS settings? Hard to imagine that such browsers would handle anything of the rest of the site. And what browsers do you mean with that?

andypost’s picture

Status: Active » Needs review

Patch needs frontender's review about changes in JS

Backend part is great + fixes to coding standards

ilya.no’s picture

Hi, @agoradesign ! Thanks for your feedback. About your last statement, By "old browsers" I mead IE8, first of all. And in this browser Drupal JS doesn't seem to work, at least during my tests. So I had to change logic in the way, that it always works and even when Drupal JS is broken, it will show to user the reason.

gumanist’s picture

Status: Needs review » Needs work

Have few thoughts on this fix:
- can you explain why do we need setTimeout to instantiate browser support? Author recommends this approach in examples: https://github.com/burocratik/outdated-browser/blob/develop/demo/default... is it suitable for us?
- using html attribute https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/onclick will make setTimeouts usage not necessary
- using php's function json_encode will make settings code a bit more clear

andypost’s picture

As you added configuration final render needs depend on this configuration object cache metadata

YurkinPark’s picture

can you explain why do we need setTimeout to instantiate browser support? Author recommends this approach in examples: https://github.com/burocratik/outdated-browser/blob/develop/demo/default... is it suitable for us?

setTimeout allows to initiate running separately. Authors implementation can be broken in case oldonload function will be failed

- using html attribute https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/onclick will make setTimeouts usage not necessary

Why do we need to click something?

- using php's function json_encode will make settings code a bit more clear

Make sense to make this part more clear, agreed

YurkinPark’s picture

Status: Needs work » Needs review
StatusFileSize
new15.56 KB

Providing json_encode implementation to move init variable on js side

andypost’s picture

@YurkinPark please provide interdiff of changes from #2

mrweiner’s picture

I can confirm that the message is shown with both patches applied. However, there is a conflict between outdatedbrowser.libraries.yml and the installation instruction in the README that may as well be rolled into the final patch. The README states:

Ensure, that the js and css files, as well as the "lang" subdirectory are
found within the following path:
libraries/outdatedbrowser/

...while outdatedbrowser.libraries.yml looks for the library files in /libraries/outdated-browser/outdatedbrowser/. This leads to the library not being found when following the included installation instructions.

agoradesign’s picture

@mrweiner:

correct, the instructions for manual installation are outdated. It's necessary to look into "outdated-browser" directory because the JS library is named "outdated-browser", so Composer will install it into that directory.

Please open a separate issue for this (including a patch would be preferred)