Add leaflet js/css #368

Manually merged
nobody merged 3 commits from TheMageKing/LocalCDN:develop into develop 5 months ago

Sorry I didn't submit this earlier today so you could actually see it. I just added Leaflet, a mapping service. Not a big difference to privacy, since the map iteself must be loaded, but it does reduce the number of third-parties who you contatct.

I didn't modify the changlog, unfortunately.

Please give these changes a good, hard look: I'm still figuring out the code.

Sorry I didn't submit this earlier today so you could actually see it. I just added Leaflet, a mapping service. Not a big difference to privacy, since the map iteself must be loaded, but it does reduce the number of third-parties who you contatct. I didn't modify the changlog, unfortunately. Please give these changes a good, hard look: I'm still figuring out the code.
TheMageKing added 1 commit 6 months ago
Owner

Thanks for the PR. Can you add a website where this can be tested?

Thanks for the PR. Can you add a website where this can be tested?
nobody reviewed 6 months ago
} else if (path.startsWith('/jquery.lazy/')) {
val = 'jQuery Lazy';
} else if (path.startsWith('/leaflet/')) {
val = 'leaflet';
Poster
Owner

It's not necessary to define this resource as a bundle if you declare the JavaScript and CSS file separately.

It's not necessary to define this resource as a bundle if you declare the JavaScript and CSS file separately.
Poster

Probably the cause of the aforementioned testing failure. Dropping...

Probably the cause of the aforementioned testing failure. Dropping...
nobody marked this conversation as resolved
nobody reviewed 6 months ago
} else if (type.startsWith('/lazysizes/5.')) {
return '5.3.1';
} else if (type.startsWith('/leaflet/0.')) {
return '0.7.7';
Poster
Owner

Are there any breaking changes between these two versions that make it impossible to upgrade?

Are there any breaking changes between these two versions that make it impossible to upgrade?
Poster

I assume so: semantic versioning (Standardized versioning scheme, of major.minor.patch, used by many projects, where minor releases are usually mostly backwards compatable, and major releases are very much not) indicates that. Further, the fact that they are continuing to distribute a legacy version is a big ol' indicator. I can look into it more if yo'd like

I assume so: semantic versioning (Standardized versioning scheme, of major.minor.patch, used by many projects, where minor releases are usually mostly backwards compatable, and major releases are very much not) indicates that. Further, the fact that they are continuing to distribute a legacy version is a big ol' indicator. I can look into it more if yo'd like
Poster
Owner

That would be good 👍

Nothing is so often out of standard as web development 😉

That would be good :+1: Nothing is so often out of standard as web development :wink:
Poster

Confirmed, this realease has quite a few breaking changes

Confirmed, this realease has quite a few breaking changes
nobody marked this conversation as resolved
Poster

Leafletjs.com. There is a map built into the homepage (doesn't reveal your location, always centered in london).

However, when I just tested it (becuase, as mentioned, busy earlier) it wasn't loading, and I wasn't sure how I screwed it up.

Leafletjs.com. There is a map built into the homepage (doesn't reveal your location, always centered in london). However, when I just tested it (becuase, as mentioned, busy earlier) it wasn't loading, and I wasn't sure how I screwed it up.
TheMageKing added 1 commit 6 months ago
Poster

Unbundled and extension releoaded. It's still not showing the map, claiming a 'failure to resolve (cdn url)"

Unbundled and extension releoaded. It's still not showing the map, claiming a 'failure to resolve (cdn url)"
nobody reviewed 6 months ago
},
// leaflet
'leafletJS':{
'path': 'resources/leaflet/{version}/leaflet.jsm'
Poster
Owner

Please use the minified version: https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.7.1/leaflet.min.js

The file does not exist in /resources/leaflet

Please use the minified version: https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.7.1/leaflet.min.js The file does not exist in `/resources/leaflet`
Poster

Actually, the leaflet.js file IS minified. When cloudflare adds another layer of minification, the only thing that gets removed is the license header (which is debateably legal).

Actually, the leaflet.js file IS minified. When cloudflare adds another layer of minification, the only thing that gets removed is the license header (which is debateably legal).
nobody marked this conversation as resolved
nobody reviewed 6 months ago
'path': 'resources/leaflet/{version}/leaflet.jsm'
},
'leafletCSS':{
'path': 'resources/leaflet/{version}/leaflet.css'
Poster
Owner

Please use the minified version: https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.7.1/leaflet.min.css

The file does not exist in /resources/leaflet

Please use the minified version: https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.7.1/leaflet.min.css The file does not exist in `/resources/leaflet`
Poster

Minified version saves a small ammount of space, switching...

Minified version saves a small ammount of space, switching...
Poster

Actually, the minified CSS isn't a great choice. It doesn't exist for 0.7.7, which makes life a whole lot more complicated for integrity checks. The space saved is a whopping 600 bytes: I really don't think its worth it to switch

Actually, the minified CSS isn't a great choice. It doesn't exist for 0.7.7, which makes life a whole lot more complicated for integrity checks. The space saved is a whopping 600 bytes: I really don't think its worth it to switch
Poster

(that'd be 3kb, actually: its 600 bytes compressed, 3 kb uncompressed)

(that'd be 3kb, actually: its 600 bytes compressed, 3 kb uncompressed)
Poster
Owner

It wasn't just about file size, it was about consistency. But I think we can leave it as it is.

It wasn't just about file size, it was about consistency. But I think we can leave it as it is.
nobody marked this conversation as resolved
Poster

I figued out the issue with the nonexistent resources: I committed with git commit -am, which doesnt add untracked files 🤦 . I swear I'm an experienced Git user...

I figued out the issue with the nonexistent resources: I committed with git commit -am, which doesnt add untracked files 🤦 . I swear I'm an experienced Git user...
TheMageKing added 1 commit 6 months ago
Poster

Tested, worked wonderfully

Tested, worked wonderfully
nobody added the
missing framework/mapping
label 5 months ago
nobody added this to the v2.6.5 milestone 5 months ago
nobody merged commit fde7884b42 into develop manually 5 months ago
Owner

Tested, worked wonderfully

Works fine
Audit passed

I've added the release notes page.

Thanks for PR 👍

> Tested, worked wonderfully :white_check_mark: Works fine :white_check_mark: Audit passed I've added the release notes page. Thanks for PR :+1:
The pull request has been manually merged as fde7884b42.
Sign in to join this conversation.
Loading…
There is no content yet.