Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implement secondary navigation for datasets #9982

Merged
merged 7 commits into from Jun 10, 2020

Conversation

lilykuang
Copy link
Member

@lilykuang lilykuang commented Jun 3, 2020

SUMMARY

This PR is part of new UX/UI design for Superset, see SIP-34. It updates "Sources" navigation menu to new secondary navigation component below the main navigation. New navigation bar is behind feature LIST_VIEWS_NEW_UI and ENABLE_REACT_CRUD_VIEWS. The reset of the redesign is still working in process.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:
Screen Shot 2020-06-03 at 3 52 08 PM

After:
Screen Shot 2020-06-03 at 4 46 20 PM

TEST PLAN

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

@codecov-commenter
Copy link

codecov-commenter commented Jun 3, 2020

Codecov Report

Merging #9982 into master will decrease coverage by 0.96%.
The diff coverage is 91.17%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9982      +/-   ##
==========================================
- Coverage   71.38%   70.42%   -0.97%     
==========================================
  Files         585      586       +1     
  Lines       30949    31072     +123     
  Branches     3261     3281      +20     
==========================================
- Hits        22094    21883     -211     
- Misses       8746     9078     +332     
- Partials      109      111       +2     
Flag Coverage Δ
#cypress 53.92% <ø> (-0.16%) ⬇️
#javascript 59.44% <91.17%> (+0.04%) ⬆️
#python 69.98% <ø> (-1.60%) ⬇️
Impacted Files Coverage Δ
...set-frontend/src/views/datasetList/DatasetList.tsx 55.55% <85.71%> (+0.92%) ⬆️
superset-frontend/src/components/Menu/SubMenu.tsx 92.59% <92.59%> (ø)
superset/examples/countries.py 0.00% <0.00%> (-100.00%) ⬇️
superset/utils/decorators.py 55.00% <0.00%> (-33.34%) ⬇️
superset/viz.py 57.15% <0.00%> (-14.83%) ⬇️
...tend/src/explore/components/DisplayQueryButton.jsx 68.42% <0.00%> (-7.90%) ⬇️
superset-frontend/src/explore/exploreUtils.js 74.45% <0.00%> (-7.20%) ⬇️
...ponents/Select/WindowedSelect/WindowedMenuList.tsx 93.10% <0.00%> (-3.45%) ⬇️
superset/connectors/connector_registry.py 84.44% <0.00%> (-2.23%) ⬇️
...uperset-frontend/src/views/chartList/ChartList.tsx 61.22% <0.00%> (-2.02%) ⬇️
... and 51 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dcac860...102981a. Read the comment docs.

@lilykuang lilykuang force-pushed the lily/secondary-navigation-datasets branch from 4dd33f7 to 21cbf89 Compare June 3, 2020 23:09
@lilykuang lilykuang marked this pull request as ready for review June 3, 2020 23:48
text-transform: uppercase;
font-weight: 500;
font-size: @font-size-s;
background-color: #20a7c9;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make the blue "+DATASET" button @brand-primary for the time being.

Copy link
Member

@nytai nytai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a couple comments re: translation. otherwise looks good

superset-frontend/src/components/Menu/SubMenu.tsx Outdated Show resolved Hide resolved
superset-frontend/src/views/datasetList/DatasetList.tsx Outdated Show resolved Hide resolved
superset-frontend/src/views/datasetList/DatasetList.tsx Outdated Show resolved Hide resolved
superset-frontend/src/views/datasetList/DatasetList.tsx Outdated Show resolved Hide resolved
superset-frontend/src/views/datasetList/DatasetList.tsx Outdated Show resolved Hide resolved
superset-frontend/src/components/Menu/SubMenu.tsx Outdated Show resolved Hide resolved
Copy link
Member

@willbarrett willbarrett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one thought on color variables :)

font-size: @font-size-s;
padding: 8px;
margin: 8px;
color: #3d3d3d;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be a color variable?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seconded: if there is any chance these colors will be reused it should be moved into a variable

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In cases of grays like this, there should be one pretty close to what you need... and we can adjust the global variable(s) to move closer to the new design as needed. Ping me if you want to discuss.

}
li.active > a,
li > a:hover {
background: #eceef2;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question - should this be a variable?

@@ -34,6 +34,8 @@
@gray-bg: #f5f5f5;
@gray-heading: #a3a3a3;
@menu-hover: #f2f3f5;
@gray-light-hover: #eceef2;
@gray-drak-heading: #3d3d3d;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo? should we just reuse one of the greys above?

border-radius: 4px;
}
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, should we move these to styled components or are we ok with living in a world with a mix of less + css-in-js?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ktmud good suggestion. I think moving to these to styled components will be cleaner. I will move css to the component.

* under the License.
*/
import React from 'react';
import { Button, Nav, Navbar, MenuItem } from 'react-bootstrap';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may also want to decide whether to keep creating new UI components based on Bootstrap. To me, this seems like a great opportunity to migrate away from it.

What do you think, @rusackas @kristw ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To me migrating away from bootstrap is an important decision with intricate considerations that are outside the scope of this PR. We should start a [DISCUSS] thread on the mailing list on this topic.

Copy link
Member

@ktmud ktmud Jun 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There were some discussion when SIP-34 was closed and I thought the general consensus was we wanted to at least move away from Bootstrap 3?

If we are to implement new UI components for the new design, it'd be the best to start clean and reduce dependencies on Bootstrap as much as possible, especially if the component doesn't need to reuse much styling from Bootstrap anyway.

@nytai nytai merged commit 5339d31 into apache:master Jun 10, 2020
@nytai nytai deleted the lily/secondary-navigation-datasets branch June 10, 2020 18:55
auxten pushed a commit to auxten/incubator-superset that referenced this pull request Nov 20, 2020
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.37.0 labels Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/L 🚢 0.37.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants