Skip to content
Snippets Groups Projects
Unverified Commit c8aa5692 authored by E'zeki&el Kigbo's avatar E'zeki&el Kigbo :speech_balloon:
Browse files

Swap create flash functions

Replaces the default export flash
function with the newCreateFlash.

Fix outstanding flash imports

Updates specs and replaces outstanding
imports for `Flash`

Fixes additional specs

Updates the remaining calls to different
flash methods, except for the window.Flash
method since this will break .erb templates
parent be63a5e0
No related branches found
No related tags found
No related merge requests found
Showing
with 23 additions and 23 deletions
import service from '../../services';
import * as types from './mutation_types';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import Poll from '~/lib/utils/poll';
import { __ } from '~/locale';
 
Loading
Loading
import Service from '../../services';
import * as types from './mutation_types';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import Poll from '~/lib/utils/poll';
import { __ } from '~/locale';
 
Loading
Loading
import { __ } from '~/locale';
import axios from '~/lib/utils/axios_utils';
import { refreshCurrentPage } from '~/lib/utils/url_utility';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { transformFrontendSettings } from '../utils';
import * as types from './mutation_types';
 
Loading
Loading
import $ from 'jquery';
import axios from '../lib/utils/axios_utils';
import { __ } from '../locale';
import Flash from '../flash';
import { deprecatedCreateFlash as Flash } from '../flash';
import LazyLoader from '../lazy_loader';
import { togglePopover } from '../shared/popover';
 
Loading
Loading
import createFlash from '../flash';
import { deprecatedCreateFlash as createFlash } from '../flash';
import AjaxFilter from '../droplab/plugins/ajax_filter';
import FilteredSearchDropdown from './filtered_search_dropdown';
import DropdownUtils from './dropdown_utils';
Loading
Loading
import Flash from '../flash';
import { deprecatedCreateFlash as Flash } from '../flash';
import Ajax from '../droplab/plugins/ajax';
import Filter from '../droplab/plugins/filter';
import FilteredSearchDropdown from './filtered_search_dropdown';
Loading
Loading
import Flash from '../flash';
import { deprecatedCreateFlash as Flash } from '../flash';
import Ajax from '../droplab/plugins/ajax';
import Filter from '../droplab/plugins/filter';
import FilteredSearchDropdown from './filtered_search_dropdown';
Loading
Loading
Loading
Loading
@@ -3,7 +3,7 @@ import recentSearchesStorageKeys from 'ee_else_ce/filtered_search/recent_searche
import { getParameterByName, getUrlParamsArray } from '~/lib/utils/common_utils';
import IssuableFilteredSearchTokenKeys from '~/filtered_search/issuable_filtered_search_token_keys';
import { visitUrl } from '../lib/utils/url_utility';
import Flash from '../flash';
import { deprecatedCreateFlash as Flash } from '../flash';
import FilteredSearchContainer from './container';
import RecentSearchesRoot from './recent_searches_root';
import RecentSearchesStore from './stores/recent_searches_store';
Loading
Loading
Loading
Loading
@@ -4,7 +4,7 @@ import FilteredSearchContainer from '~/filtered_search/container';
import FilteredSearchVisualTokens from '~/filtered_search/filtered_search_visual_tokens';
import AjaxCache from '~/lib/utils/ajax_cache';
import DropdownUtils from '~/filtered_search/dropdown_utils';
import Flash from '~/flash';
import { deprecatedCreateFlash as Flash } from '~/flash';
import UsersCache from '~/lib/utils/users_cache';
import { __ } from '~/locale';
import * as Emoji from '~/emoji';
Loading
Loading
Loading
Loading
@@ -75,7 +75,7 @@ const removeFlashClickListener = (flashEl, fadeTransition) => {
* @param {Function} clickHandler Method to call when action is clicked on
* @param {Boolean} fadeTransition Boolean to determine whether to fade the alert out
*/
const createFlash = function createFlash(
const deprecatedCreateFlash = function deprecatedCreateFlash(
message,
type = FLASH_TYPES.ALERT,
parent = document,
Loading
Loading
@@ -127,7 +127,7 @@ const createFlash = function createFlash(
* @param {Boolean} options.captureError Boolean to determine whether to send error to sentry
* @param {Object} options.error Error to be captured in sentry
*/
const newCreateFlash = function newCreateFlash({
const createFlash = function createFlash({
message,
type = FLASH_TYPES.ALERT,
parent = document,
Loading
Loading
@@ -168,11 +168,11 @@ const newCreateFlash = function newCreateFlash({
 
export {
createFlash as default,
newCreateFlash,
deprecatedCreateFlash,
createFlashEl,
createAction,
hideFlash,
removeFlashClickListener,
FLASH_TYPES,
};
window.Flash = createFlash;
window.Flash = deprecatedCreateFlash;
import $ from 'jquery';
import { parseQueryStringIntoObject } from '~/lib/utils/common_utils';
import axios from '~/lib/utils/axios_utils';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { __ } from '~/locale';
 
export default class GpgBadges {
Loading
Loading
import axios from '~/lib/utils/axios_utils';
import { __ } from '~/locale';
import createFlash from '~/flash';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { refreshCurrentPage } from '~/lib/utils/url_utility';
import * as mutationTypes from './mutation_types';
 
Loading
Loading
import { slugify } from './lib/utils/text_utility';
import fetchGroupPathAvailability from '~/pages/groups/new/fetch_group_path_availability';
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import { __ } from '~/locale';
 
export default class Group {
Loading
Loading
import $ from 'jquery';
import { __ } from '~/locale';
import axios from './lib/utils/axios_utils';
import flash from './flash';
import { deprecatedCreateFlash as flash } from './flash';
 
const tooltipTitles = {
group: __('Unsubscribe at group level'),
Loading
Loading
<script>
import { mapActions, mapState, mapGetters } from 'vuex';
import { GlModal } from '@gitlab/ui';
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import { __, sprintf, s__ } from '~/locale';
import { modalTypes } from '../../constants';
import { trimPathComponents, getPathParent } from '../../utils';
Loading
Loading
<script>
import { mapState, mapGetters, mapActions } from 'vuex';
import { viewerInformationForPath } from '~/vue_shared/components/content_viewer/lib/viewer_utils';
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import ContentViewer from '~/vue_shared/components/content_viewer/content_viewer.vue';
import DiffViewer from '~/vue_shared/components/diff_viewer/diff_viewer.vue';
import {
Loading
Loading
import Vue from 'vue';
import IdeRouter from '~/ide/ide_router_extension';
import { joinPaths } from '~/lib/utils/url_utility';
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import { __ } from '~/locale';
import { syncRouterAndStore } from './sync_router_and_store';
 
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@ import Vue from 'vue';
import { escape } from 'lodash';
import { __, sprintf } from '~/locale';
import { visitUrl } from '~/lib/utils/url_utility';
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import * as types from './mutation_types';
import { decorateFiles } from '../lib/files';
import { stageKeys } from '../constants';
Loading
Loading
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import { __ } from '~/locale';
import service from '../../services';
import * as types from '../mutation_types';
Loading
Loading
import { escape } from 'lodash';
import flash from '~/flash';
import { deprecatedCreateFlash as flash } from '~/flash';
import { __, sprintf } from '~/locale';
import service from '../../services';
import api from '../../../api';
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment