Repository navigation
[SIP-15] Adding initial framework - #8398
Conversation
81ae5e0 to
1f285af
Compare
Codecov Report
@@ Coverage Diff @@
## master #8398 +/- ##
==========================================
- Coverage 66.58% 66.56% -0.03%
==========================================
Files 449 449
Lines 22525 22567 +42
Branches 2364 2367 +3
==========================================
+ Hits 14999 15021 +22
- Misses 7388 7408 +20
Partials 138 138
Continue to review full report at Codecov.
|
1f285af to
d1d05b4
Compare
etr2460
left a comment
There was a problem hiding this comment.
a few comments on the JS stuff
There was a problem hiding this comment.
Maybe prefixing this with Action Required: or something like that to make it more apparent what's needed?
There was a problem hiding this comment.
@etr2460 one issue I ran into is that any more text would wrap in the toast which looked a tad weird. Do you know if these toasts can be resized?
There was a problem hiding this comment.
You could always increase the max size of the toasts. It seems like a reasonable change
There was a problem hiding this comment.
we should really avoid dangerously setting html. Why not encode the URL in another way and then pull it out of the string? I know this is just to make flash work since it only accepts a string. But instead i'd send a flash something like:
Preview then save your chart using the new time range endpoints $$$SUPER_UNIQUE_TOKEN_FOR_ENCODING_LINK_FOR_HERE$$$http://superset.../
Then you could just do in a helper function:
const parts = str.split('$$$SUPER_UNIQUE_TOKEN_FOR_ENCODING_LINK_FOR_HERE$$$');
if (parts.length > 1) {
return <div>{parts.length[0]} <a href={parts.length[1]}>here</a>.</div>;
} else {
return <div>{parts.length[0]}</div>;
}There was a problem hiding this comment.
But in general, this is super hacky.... maybe there's a way to do this without needing to use flash?
There was a problem hiding this comment.
I'd pull this out to the top of the file and name is something like ISO_8601_REGEX_MATCH
dfc2925 to
f8b4b63
Compare
There was a problem hiding this comment.
nit: remove extra underscore here
There was a problem hiding this comment.
Should we elaborate more about SIP-15 here? Provide a link or something?
There was a problem hiding this comment.
@etr2460 this control is always hidden and only exists to ensure that associated form-data is preserved.
There was a problem hiding this comment.
You could always increase the max size of the toasts. It seems like a reasonable change
|
@etr2460 I addressed your comments. |
a8852e6 to
d051e8c
Compare
|
@etr2460 would you mind reviewing this again? |
There was a problem hiding this comment.
these can be {endpoints && `(${endpoints[0]})`} instead of the ternary with the empty string
There was a problem hiding this comment.
same note here about the ternary. some newlines might also make this more readable.
There was a problem hiding this comment.
i think this should all be above line 682, otherwise you'll be overriding custom configs here
|
@etr2460 I addressed your comments. |
7c92647 to
8cf290b
Compare
* [sip-15] Adding initial framework * [toast] Addressing etr2460's comments * [fix] Addressing etr2460's comments
* [sip-15] Adding initial framework * [toast] Addressing etr2460's comments * [fix] Addressing etr2460's comments
CATEGORY
Choose one
SUMMARY
This PR provides the initial framework for SIP-15 which is currently behind a disabled feature flag. Note this is still WIP as SIP-15A also needs to be addressed prior to this feature being live.
Given that SIP-15 requires a rollout period (where users can preview and correct changes as necessary) the premise of this PR is to add the necessary wiring to allow users to:
now,7 days ago, etc.[start, end](or equivalent) interval is changed to[start, end).Note the backend logic is behind a feature flag whereas the frontend logic which leverages the endpoints is not, i.e., the the
endpointsprop is simply undefined. These endpoints will persist after SIP-15 has been rolled out (to provide more transparency as to how the time range endpoints behave though we'll simply hard code these).BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Current
SIP-15 enabled but chart not updated
SIP-15 enabled chart preview link
SIP-15 enabled and chart updated (via preview or save)
TEST PLAN
ADDITIONAL INFORMATION
REVIEWERS
to: @betodealmeida @etr2460 @michellethomas @mistercrunch @villebro
cc: @sylvia-tomiyama