Skip to content

Commit

Permalink
[DDW-1011] prevent news feed from overlapping full screen dialogs
Browse files Browse the repository at this point in the history
  • Loading branch information
shawnbusuttil committed Mar 17, 2022
1 parent 3bf4547 commit d105ca6
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,15 @@ class Step1ConfigurationContainer extends Component<Props> {
return walletAmount && walletAmount.gte(minRewardsFunds);
};

componentDidMount() {
const { app } = this.props.stores;
const { closeNewsFeed } = this.props.actions.app;

if (app.newsFeedIsOpen) {
closeNewsFeed.trigger();
}
}

render() {
const { actions, stores, onBack, onClose } = this.props;
const { app, staking, wallets } = stores;
Expand Down
3 changes: 2 additions & 1 deletion source/renderer/app/containers/static/AboutDialog.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import '../../themes/mixins/overlay-backdrop';
@import '../../themes/mixins/layers';

.overlay {
background-color: var(--theme-about-window-background-color);
Expand All @@ -9,7 +10,7 @@
position: fixed;
right: 0;
top: 0;
z-index: 9999;
z-index: $dialog-z-index;

&::-webkit-scrollbar-button {
height: 21px;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import '../../themes/mixins/overlay-backdrop';
@import '../../themes/mixins/layers';

.overlay {
bottom: 0;
Expand All @@ -7,7 +8,7 @@
position: fixed;
right: 0;
top: 0;
z-index: 9999;
z-index: $dialog-z-index;
@include overlay-backrop;

*::-webkit-scrollbar-button {
Expand Down
3 changes: 3 additions & 0 deletions source/renderer/app/stores/AppStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@ export default class AppStore extends Store {
};
@action
_updateActiveDialog = (currentDialog: ApplicationDialog) => {
if (this.newsFeedIsOpen) {
this.newsFeedIsOpen = false;
}
if (this.activeDialog !== currentDialog) this.activeDialog = currentDialog;
};
@action
Expand Down
3 changes: 2 additions & 1 deletion source/renderer/app/themes/mixins/layers.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
$dialog-z-index: 10001;
$backdrop-z-index: 10000;
$dialog-z-index: 10000;
$loader-backdrop-z-index: 5;
$back-to-top-z-index: 5;
$sticky-header-z-index: 1;
3 changes: 2 additions & 1 deletion source/renderer/app/themes/overrides/ModalOverrides.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
@import '../mixins/overlay-backdrop';
@import '../mixins/layers.scss';

.overlay {
@include overlay-backrop;
overflow: hidden;
z-index: 100;
z-index: $backdrop-z-index;
}

.modal {
Expand Down

0 comments on commit d105ca6

Please sign in to comment.