chore: Remove logo forced width (#19049)
* Remove logo forced width * improve styling * improve paddings * Update UPDATING.md * Fixes a typo * Add fixed height Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com> Co-authored-by: Evan Rusackas <evan@preset.io>
This commit is contained in:
parent
72b9a7fa5b
commit
9ae51f7a48
|
|
@ -29,6 +29,7 @@ assists people when migrating to a new version.
|
|||
|
||||
### Breaking Changes
|
||||
|
||||
- [19049](https://github.com/apache/superset/pull/19049): APP_ICON_WIDTH has been removed from the config. Superset should now be able to handle different logo sizes without having to explicitly set an APP_ICON_WIDTH. This might affect the size of existing custom logos as the UI will now resize them according to the specified space of maximum 148px and not according to the value of APP_ICON_WIDTH.
|
||||
- [19274](https://github.com/apache/superset/pull/19274): The `PUBLIC_ROLE_LIKE_GAMMA` config key has been removed, set `PUBLIC_ROLE_LIKE` = "Gamma" to have the same functionality.
|
||||
- [19273](https://github.com/apache/superset/pull/19273): The `SUPERSET_CELERY_WORKERS` and `SUPERSET_WORKERS` config keys has been removed. Configure celery directly using `CELERY_CONFIG` on Superset
|
||||
- [19231](https://github.com/apache/superset/pull/19231): The `ENABLE_REACT_CRUD_VIEWS` feature flag has been removed (permanently enabled). Any deployments which had set this flag to false will need to verify that the React views support their use case.
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@ interface BrandProps {
|
|||
path: string;
|
||||
icon: string;
|
||||
alt: string;
|
||||
width: string | number;
|
||||
tooltip: string;
|
||||
text: string;
|
||||
}
|
||||
|
|
@ -97,6 +96,18 @@ const StyledHeader = styled.header`
|
|||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
/* must be exactly the height of the Antd navbar */
|
||||
min-height: 50px;
|
||||
padding: ${({ theme }) =>
|
||||
`${theme.gridUnit}px ${theme.gridUnit * 2}px ${theme.gridUnit}px ${
|
||||
theme.gridUnit * 4
|
||||
}px`};
|
||||
max-width: ${({ theme }) => `${theme.gridUnit * 37}px`};
|
||||
|
||||
img {
|
||||
height: 100%;
|
||||
object-fit: contain;
|
||||
}
|
||||
}
|
||||
.navbar-brand-text {
|
||||
border-left: 1px solid ${({ theme }) => theme.colors.grayscale.light2};
|
||||
|
|
@ -273,7 +284,7 @@ export function Menu({
|
|||
arrowPointAtCenter
|
||||
>
|
||||
<a className="navbar-brand" href={brand.path}>
|
||||
<img width={brand.width} src={brand.icon} alt={brand.alt} />
|
||||
<img src={brand.icon} alt={brand.alt} />
|
||||
</a>
|
||||
</Tooltip>
|
||||
{brand.text && (
|
||||
|
|
|
|||
|
|
@ -234,7 +234,6 @@ APP_NAME = "Superset"
|
|||
|
||||
# Specify the App icon
|
||||
APP_ICON = "/static/assets/images/superset-logo-horiz.png"
|
||||
APP_ICON_WIDTH = 126
|
||||
|
||||
# Specify where clicking the logo would take the user
|
||||
# e.g. setting it to '/' would take the user to '/superset/welcome/'
|
||||
|
|
|
|||
|
|
@ -317,7 +317,6 @@ def menu_data() -> Dict[str, Any]:
|
|||
"path": appbuilder.app.config["LOGO_TARGET_PATH"] or "/",
|
||||
"icon": appbuilder.app_icon,
|
||||
"alt": appbuilder.app_name,
|
||||
"width": appbuilder.app.config["APP_ICON_WIDTH"],
|
||||
"tooltip": appbuilder.app.config["LOGO_TOOLTIP"],
|
||||
"text": brand_text,
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue