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

fix: fixed some layout issues #85

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

### Fixed

- Fixed some layout issues

## [1.16.3] - 2022-11-09

### Fixed
Expand Down
15 changes: 9 additions & 6 deletions react/components/UserWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { AutocompleteInput, Button, Tag } from 'vtex.styleguide'
import { useCssHandles } from 'vtex.css-handles'
import { useRuntime } from 'vtex.render-runtime'

import userWidgetCss from './userWidget.css'
import {
organizationMessages as storeMessages,
userWidgetMessages as messages,
Expand Down Expand Up @@ -74,7 +75,7 @@ const CustomOrganizationOption = (props: any) => {
onClick={onClick}
disabled={value.status !== 'active'}
>
<div className="flex items-center">
<div className="flex items-center truncate">
<span className="pr2">{renderOptionHighlightedText()}</span>
{typeof value !== 'string' && (
<div className="t-mini c-muted-1">{value.caption}</div>
Expand Down Expand Up @@ -295,7 +296,7 @@ const UserWidget: FunctionComponent = () => {

return (
<div
className={`${handles.userWidgetContainer} w-100 flex flex-column mv3 bg-base--inverted`}
className={`${handles.userWidgetContainer} w-100 flex flex-column mv3 bg-base--inverted ${userWidgetCss.userWidget__zIndex}`}
>
<div
className={`${handles.userWidgetRow} flex justify-center items-center`}
Expand All @@ -305,10 +306,12 @@ const UserWidget: FunctionComponent = () => {
>
{(!userWidgetData?.checkImpersonation?.email &&
organizationsState.organizationOptions.length > 1 && (
<AutocompleteInput
input={organizationAutoCompleteInput}
options={autoCompleteOrganizationOptions}
/>
<Fragment>
<AutocompleteInput
input={organizationAutoCompleteInput}
options={autoCompleteOrganizationOptions}
/>
</Fragment>
)) || (
<Fragment>
{`${formatMessage(messages.organization)} ${
Expand Down
3 changes: 3 additions & 0 deletions react/components/userWidget.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.userWidget__zIndex {
z-index: 9999;
}