You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "francois-travais (via GitHub)" <gi...@apache.org> on 2023/11/20 13:09:22 UTC

[PR] feat(deckgl-map): use an arbitraty Mabpox style URL (#26027) [superset]

francois-travais opened a new pull request, #26031:
URL: https://github.com/apache/superset/pull/26031

   ### SUMMARY
   <!--- Describe the change below, including rationale and design decisions -->
   
   In the DeckGL map plugin we can only select a Mapbox style from [a predefined list](https://github.com/apache/superset/blob/2499a1cf5a7f298c1ee2f34b3d67ca1d18bb7457/superset-frontend/plugins/legacy-preset-chart-deckgl/src/utilities/Shared_DeckGL.jsx#L373).
   
   I've made the select box free form, meaning that we can copy-paste [a Mapbox style URL](https://docs.mapbox.com/help/glossary/style-url/) directly. I've also added a basic validator for UX purpose.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   
   ### TESTING INSTRUCTIONS
   <!--- Required! What steps can be taken to manually verify the changes? -->
   
   Copy paste an arbitrary Mapbox URL in the select box and see the map change.
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [x] Has associated issue: #26027
   - [ ] Required feature flags:
   - [x] Changes UI
   - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(deckgl-map): use an arbitraty Mabpox style URL (#26027) [superset]

Posted by "kgabryje (via GitHub)" <gi...@apache.org>.
kgabryje commented on PR #26031:
URL: https://github.com/apache/superset/pull/26031#issuecomment-1828162439

   1 more - wdyt about moving mapbox style controls to a separate line, so that the whole style URL fits in it? We can do it as a follow up if you prefer
   <img width="354" alt="MAP STYLE" src="https://github.com/apache/superset/assets/15073128/8d3a8e42-9ff0-4956-8e89-c6e267e76e7a">
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(deckgl-map): use an arbitraty Mabpox style URL (#26027) [superset]

Posted by "kgabryje (via GitHub)" <gi...@apache.org>.
kgabryje commented on PR #26031:
URL: https://github.com/apache/superset/pull/26031#issuecomment-1828150205

   @francois-travais Thank you for your contribution, looks really nice! I added 1 small suggestion, lmk if it makes sense


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(deckgl-map): use an arbitraty Mabpox style URL (#26027) [superset]

Posted by "francois-travais (via GitHub)" <gi...@apache.org>.
francois-travais commented on PR #26031:
URL: https://github.com/apache/superset/pull/26031#issuecomment-1820409553

   Thanks @john-bodley . I know I'm missing a translation key (in the validator) but I cannot get babel script to work. I'm gonna try again today.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(deckgl-map): use an arbitraty Mabpox style URL (#26027) [superset]

Posted by "francois-travais (via GitHub)" <gi...@apache.org>.
francois-travais commented on PR #26031:
URL: https://github.com/apache/superset/pull/26031#issuecomment-1875387063

   @kgabryje do you know in which release this feature is planned ? I don't see it in 3.1.0rc3.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(deckgl-map): use an arbitraty Mabpox style URL (#26027) [superset]

Posted by "francois-travais (via GitHub)" <gi...@apache.org>.
francois-travais commented on PR #26031:
URL: https://github.com/apache/superset/pull/26031#issuecomment-1827783606

   @kgabryje Would you have time to look at this tiny PR please ? I would love to see this feature merged. Thanks


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(deckgl-map): use an arbitraty Mabpox style URL (#26027) [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas merged PR #26031:
URL: https://github.com/apache/superset/pull/26031


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(deckgl-map): use an arbitraty Mabpox style URL (#26027) [superset]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #26031:
URL: https://github.com/apache/superset/pull/26031#issuecomment-1819582299

   ## [Codecov](https://app.codecov.io/gh/apache/superset/pull/26031?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   Attention: `4 lines` in your changes are missing coverage. Please review.
   > Comparison is base [(`2499a1c`)](https://app.codecov.io/gh/apache/superset/commit/2499a1cf5a7f298c1ee2f34b3d67ca1d18bb7457?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) 69.05% compared to head [(`768381c`)](https://app.codecov.io/gh/apache/superset/pull/26031?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) 69.04%.
   > Report is 4 commits behind head on master.
   
   | [Files](https://app.codecov.io/gh/apache/superset/pull/26031?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [...cy-preset-chart-deckgl/src/utilities/validators.ts](https://app.codecov.io/gh/apache/superset/pull/26031?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcHJlc2V0LWNoYXJ0LWRlY2tnbC9zcmMvdXRpbGl0aWVzL3ZhbGlkYXRvcnMudHM=) | 0.00% | [4 Missing :warning: ](https://app.codecov.io/gh/apache/superset/pull/26031?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #26031      +/-   ##
   ==========================================
   - Coverage   69.05%   69.04%   -0.01%     
   ==========================================
     Files        1938     1939       +1     
     Lines       75835    75839       +4     
     Branches     8427     8429       +2     
   ==========================================
   - Hits        52366    52365       -1     
   - Misses      21299    21304       +5     
     Partials     2170     2170              
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/superset/pull/26031/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [javascript](https://app.codecov.io/gh/apache/superset/pull/26031/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `56.21% <0.00%> (-0.01%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   
   </details>
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/superset/pull/26031?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(deckgl-map): use an arbitraty Mabpox style URL (#26027) [superset]

Posted by "kgabryje (via GitHub)" <gi...@apache.org>.
kgabryje commented on PR #26031:
URL: https://github.com/apache/superset/pull/26031#issuecomment-1877660056

   > @kgabryje do you know in which release this feature is planned ? I don't see it in 3.1.0rc3.
   
   CC @michael-s-molina 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(deckgl-map): use an arbitraty Mabpox style URL (#26027) [superset]

Posted by "shubhshah01 (via GitHub)" <gi...@apache.org>.
shubhshah01 commented on PR #26031:
URL: https://github.com/apache/superset/pull/26031#issuecomment-2114059243

   Which version is this feature available ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(deckgl-map): use an arbitraty Mabpox style URL (#26027) [superset]

Posted by "kgabryje (via GitHub)" <gi...@apache.org>.
kgabryje commented on code in PR #26031:
URL: https://github.com/apache/superset/pull/26031#discussion_r1406405704


##########
superset-frontend/plugins/legacy-plugin-chart-map-box/src/controlPanel.ts:
##########
@@ -224,6 +229,8 @@ const config: ControlPanelConfig = {
               label: t('Map Style'),
               clearable: false,
               renderTrigger: true,
+              freeForm: true,
+              validators: [validateMapboxStylesUrl],

Review Comment:
   Do you think we should add a link to mapbox styles docs in the tooltip now that the user can paste anything in here?



##########
superset-frontend/plugins/legacy-preset-chart-deckgl/src/utilities/Shared_DeckGL.jsx:
##########
@@ -370,6 +371,8 @@ export const mapboxStyle = {
     label: t('Map Style'),
     clearable: false,
     renderTrigger: true,
+    freeForm: true,
+    validators: [validateMapboxStylesUrl],

Review Comment:
   here too



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(deckgl-map): use an arbitraty Mabpox style URL (#26027) [superset]

Posted by "francois-travais (via GitHub)" <gi...@apache.org>.
francois-travais commented on code in PR #26031:
URL: https://github.com/apache/superset/pull/26031#discussion_r1407541763


##########
superset-frontend/plugins/legacy-plugin-chart-map-box/src/controlPanel.ts:
##########
@@ -224,6 +229,8 @@ const config: ControlPanelConfig = {
               label: t('Map Style'),
               clearable: false,
               renderTrigger: true,
+              freeForm: true,
+              validators: [validateMapboxStylesUrl],

Review Comment:
   I added a link to Mapbox's documentation below



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(deckgl-map): use an arbitraty Mabpox style URL (#26027) [superset]

Posted by "francois-travais (via GitHub)" <gi...@apache.org>.
francois-travais commented on PR #26031:
URL: https://github.com/apache/superset/pull/26031#issuecomment-1829531043

   @kgabryje I modified the tooltip and moved Mapbox style select to a full line.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(deckgl-map): use an arbitraty Mabpox style URL (#26027) [superset]

Posted by "john-bodley (via GitHub)" <gi...@apache.org>.
john-bodley commented on PR #26031:
URL: https://github.com/apache/superset/pull/26031#issuecomment-1819546290

   Thanks @francois-travais for the PR. I've cc'ed in somewhat who is likely well versed with DeckGL to review your change.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(deckgl-map): use an arbitraty Mabpox style URL (#26027) [superset]

Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina commented on PR #26031:
URL: https://github.com/apache/superset/pull/26031#issuecomment-1878549796

   > @kgabryje do you know in which release this feature is planned ? I don't see it in 3.1.0rc3.
   
   It will be available in the next RC.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org