fix: Use Welcome page in SPA
SUMMARY
Move Welcome (Home) page into SPA. Use GenericLink for Welcome page.
If LOGO_TARGET_PATH is None we use React Link for it otherwise we html <a>
BEFORE
https://user-images.githubusercontent.com/29536522/183296582-397a95ee-99c7-431c-b7b8-8c974237058c.mov
AFTER
https://user-images.githubusercontent.com/29536522/183296852-6539723b-b770-45df-a5a8-725004eeb2a3.mov
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in SIP-59)
- [ ] 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
Codecov Report
Merging #21006 (a271843) into master (76d6a9a) will increase coverage by
0.82%. The diff coverage isn/a.
:exclamation: Current head a271843 differs from pull request most recent head c2703b3. Consider uploading reports for the commit c2703b3 to get more accurate results
@@ Coverage Diff @@
## master #21006 +/- ##
==========================================
+ Coverage 65.45% 66.27% +0.82%
==========================================
Files 1770 1770
Lines 67539 67539
Branches 7185 7185
==========================================
+ Hits 44207 44764 +557
+ Misses 21493 20936 -557
Partials 1839 1839
| Flag | Coverage Δ | |
|---|---|---|
| hive | 53.17% <ø> (?) |
|
| mysql | 80.96% <ø> (?) |
|
| postgres | 81.02% <ø> (?) |
|
| presto | 53.07% <ø> (ø) |
|
| python | 81.50% <ø> (+1.70%) |
:arrow_up: |
| sqlite | 79.62% <ø> (ø) |
|
| unit | 50.74% <ø> (ø) |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Impacted Files | Coverage Δ | |
|---|---|---|
| superset-frontend/src/views/components/Menu.tsx | 50.00% <ø> (ø) |
|
| superset/views/base.py | 75.53% <ø> (ø) |
|
| superset/utils/core.py | 90.23% <0.00%> (+0.11%) |
:arrow_up: |
| superset/security/manager.py | 95.39% <0.00%> (+0.16%) |
:arrow_up: |
| superset/reports/commands/execute.py | 91.41% <0.00%> (+0.37%) |
:arrow_up: |
| superset/views/core.py | 75.60% <0.00%> (+0.45%) |
:arrow_up: |
| superset/db_engine_specs/base.py | 88.43% <0.00%> (+0.48%) |
:arrow_up: |
| superset/common/query_object.py | 94.38% <0.00%> (+0.51%) |
:arrow_up: |
| superset/connectors/sqla/models.py | 90.32% <0.00%> (+0.52%) |
:arrow_up: |
| ... and 32 more |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
Can we simplify Home page's path and use /home instead of /superset/welcome?
What do you think @michael-s-molina @kgabryje @stephenLYZ?
Who knows how to fix such error in Menu.test.tsx:
Error: Uncaught [Error: Invariant failed: You should not use <Link> outside a <Router>]
Can we simplify Home page's path and use
/homeinstead of/superset/welcome? What do you think @michael-s-molina @kgabryje @stephenLYZ?
I'd rather not do it now to be honest... Last time we did that it turned out to be more problematic than we anticipated
Who knows how to fix such error in
Menu.test.tsx:Error: Uncaught [Error: Invariant failed: You should not use <Link> outside a <Router>]
Just add useRouter to render options, like
render(<Menu {...mockedProps} />, {
useRouter: true,
});
/testenv up
@kgabryje Ephemeral environment spinning up at http://54.187.60.237:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.
Ephemeral environment shutdown and build artifacts deleted.