Render WMS previews for geoserver connected resources#30
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedFailed to post review comments 📝 WalkthroughWalkthroughThis PR implements comprehensive accessibility improvements, localization enhancements, and OGC map preview support. Changes include semantic HTML restructuring, lang attribute support for multilingual content, expanded i18n keys, new OGC service handling utilities, and ARIA attributes. Dark mode CSS was removed. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Browser
participant ResourcePreview
participant OgcService as OGC Service<br/>(WMS/WFS)
participant SldLoader as SLD Loader
participant LeafletMap
User->>Browser: Request map preview
Browser->>ResourcePreview: Render component
ResourcePreview->>ResourcePreview: getOgcPreviewConfig(resource)
alt Has OGC Preview
ResourcePreview->>ResourcePreview: Extract styleUrl for WFS
ResourcePreview->>OgcService: Fetch normalized OGC URL
OgcService-->>ResourcePreview: Return service response
alt styleUrl provided
ResourcePreview->>SldLoader: Load SLD from styleUrl
SldLoader->>SldLoader: Fetch & parse XML
SldLoader-->>ResourcePreview: SLD styling rules
ResourcePreview->>LeafletMap: Apply SLD styling to features
else No SLD
ResourcePreview->>LeafletMap: Render with default styling
end
else No OGC Preview
ResourcePreview->>Browser: Render static preview
end
LeafletMap-->>Browser: Display interactive map
Browser-->>User: Show map with applied styles
sequenceDiagram
participant Page as Dataset Page
participant CkanTranslations
participant PageHero
participant Browser
Page->>CkanTranslations: getLocalizedTextWithLang(title_translated, locale)
CkanTranslations-->>Page: {text, lang}
Page->>Page: Compute titleLang & descriptionLang
Page->>PageHero: Pass title, description, titleLang, descriptionLang
PageHero->>PageHero: Render h1 with lang={titleLang}
PageHero->>PageHero: Render description div with lang={descriptionLang}
PageHero-->>Browser: HTML with lang attributes
Browser->>Browser: Screen reader announces language
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes & Improvements
Documentation