plotly / plotly/plotly.js

Strip down bundled Maplibre CSS

Offen
#7,544 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

feature P2
Vorherrschende Sprache
JavaScript
Sterne
18.3k
Forks
2k
Ø Merge
2 T. 12 Std.
Gemergte PRs (30 T.)
28

Beschreibung

https://github.com/plotly/plotly.js/pull/7526 inlines the entire maplibre-gl.css stylesheet into the Plotly.js bundle, to fix the styling of attributions in MapLibre.

This works, but also adds about 45 kB to the bundle size. Plausibly we could slim down the CSS and include only the styles we definitely need.

This file (4 kB) is enough to fix the attribution styling:

maplibre-gl-attrib.css

However this will require adding a script to parse and subset the CSS which runs as part of the build process.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Überprüfe PR 7526 und die gebündelte maplibre-gl.css, um die Attributionsstile zu identifizieren, die beibehalten werden müssen. Verwende die bereitgestellte maplibre-gl-attrib.css als Ziel-Teilmenge und füge anschließend ein Build-Prozess-Skript hinzu, das das CSS parst und auf eine Teilmenge reduziert. Als erledigt gilt die Aufgabe, wenn das Attributions-Styling weiterhin funktioniert und das Bundle unnötige CSS-Größe vermeidet.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
css, javascript
Bereich
build-system, frontend
Issue-Typ
Refactoring
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.