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

GH-1071 - Remove cap on showing of banners #74

Merged
merged 5 commits into from May 23, 2018
Merged
Changes from 1 commit
Commits
File filter
Filter file types
Jump to
Jump to file
Failed to load files.

Always

Just for now

Lint fixes
  • Loading branch information
zarembsky committed May 22, 2018
commit 526fc753bc937aae92b1357a8376d27525a971b6
@@ -233,18 +233,16 @@ const _showNotification = (state, action) => {
};

/**
* Dismiss notification banners. Update notificationShown
* Dismiss notification banners. Update notificationShown
* @memberOf PanelReactReducers
* @private
* @param {Object} state current state
* @param {Object} action action which contains data
* @return {Object} notification parameters
*/
const _closeNotification = (state, action) => {
return {
notificationShown: false
};
};
const _closeNotification = (state, action) => ({
notificationShown: false
});

/**
* Update reload_banner_status and trackers_banner_status from
@@ -75,11 +75,11 @@ const handler = {
}
}

//Adjust banner statuses, as they used to be objects
//while now they are booleans. This filter covers syncing.
// Adjust banner statuses, as they used to be objects
// while now they are booleans. This filter covers syncing.
if (key === 'reload_banner_status' ||
key === 'trackers_banner_status') {
if(value && (typeof value === 'object')) {
if (value && (typeof value === 'object')) {
value = !!value.show;
}
}
@@ -78,15 +78,15 @@ class ConfData {
}

// Transfer legacy banner statuses which used to be objects
const { reload_banner_status, trackers_banner_status} = data;
if(reload_banner_status && typeof reload_banner_status === 'object') {
const { reload_banner_status, trackers_banner_status } = data;
if (reload_banner_status && typeof reload_banner_status === 'object') {
this.reload_banner_status = !!reload_banner_status.show;
_setProp('reload_banner_status', this.reload_banner_status);
} else {
_initProperty('reload_banner_status', true);
}

if(trackers_banner_status && typeof trackers_banner_status === 'object') {
if (trackers_banner_status && typeof trackers_banner_status === 'object') {
this.trackers_banner_status = !!trackers_banner_status.show;
_setProp('trackers_banner_status', this.trackers_banner_status);
} else {
ProTip! Use n and p to navigate between commits in a pull request.