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

Show right messages as soon as possible #632

Merged
merged 4 commits into from
Jun 21, 2016

Conversation

x4base
Copy link
Contributor

@x4base x4base commented Jun 16, 2016

  1. Flashed messages should be flushed in every single page, otherwise they will be accumulated and shown in the wrong page, making the users extremely confused.
  2. The error messages of API calls should be shown immediately, and should not flash any message, because it will always be shown in the wrong page.

@coveralls
Copy link

coveralls commented Jun 16, 2016

Coverage Status

Coverage remained the same at 81.941% when pulling 4ed6475 on x4base:ajax_error_messages into 04388a7 on airbnb:master.

@coveralls
Copy link

coveralls commented Jun 17, 2016

Coverage Status

Coverage increased (+0.1%) to 82.077% when pulling f1ce77e on x4base:ajax_error_messages into 04388a7 on airbnb:master.

@@ -0,0 +1,28 @@
var $ = window.$ = require('jquery');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this belongs in caravel.js or utils.js

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can move showApiMessage() and toggleCheckbox() into utils.js.
But we still need to include some .entry.js in list.html, right? Should I still include global_functions.entry.js (or maybe rename it to list.entry.js) and call util.toggleChekbox() in this file? Or do you have any other idea?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or are you only talking about the line you mentioned? I only have to replace

var $ = window.$ = require('jquery');
var jQuery = window.jQuery = $;

with

var $ = require('jquery');

, just don't touch the window variable, right?

@x4base
Copy link
Contributor Author

x4base commented Jun 17, 2016

I've just found out it shouldn't be in list.html, otherwise the script will be included multiple times if there are multiple inline list views. For example, in the datasource edit page, there are column list tab and metric list tab, so the script will be included twice. I think it should be in base.html, so I named it common.entry.js

@coveralls
Copy link

coveralls commented Jun 17, 2016

Coverage Status

Coverage increased (+0.08%) to 82.019% when pulling 2b92e3a on x4base:ajax_error_messages into 04388a7 on airbnb:master.

@mistercrunch mistercrunch merged commit 13095eb into apache:master Jun 21, 2016
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this pull request Nov 17, 2021
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this pull request Nov 24, 2021
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this pull request Nov 25, 2021
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this pull request Nov 26, 2021
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.10.0 labels Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.10.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants