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

HPCC-24341 Dismiss dialog and clear fields #13919

Merged
merged 1 commit into from
Jul 14, 2020

Conversation

miguelvazq
Copy link

@miguelvazq miguelvazq commented Jun 30, 2020

  • Dismissed dialog due to an undefined widget
  • Cleared input fields if passwords did not meet criteria

Signed-off by: Miguel Vazquez miguel.vazquez@lexisnexisrisk.com

Type of change:

  • This change is a bug fix (non-breaking change which fixes an issue).
  • This change is a new feature (non-breaking change which adds functionality).
  • This change improves the code (refactor or other change that does not change the functionality)
  • This change fixes warnings (the fix does not alter the functionality or the generated code)
  • This change is a breaking change (fix or feature that will cause existing behavior to change).
  • This change alters the query API (existing queries will have to be recompiled)

Checklist:

  • My code follows the code style of this project.
    • My code does not create any new warnings from compiler, build system, or lint.
  • The commit message is properly formatted and free of typos.
    • The commit message title makes sense in a changelog, by itself.
    • The commit is signed.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly, or...
    • I have created a JIRA ticket to update the documentation.
    • Any new interfaces or exported functions are appropriately commented.
  • I have read the CONTRIBUTORS document.
  • The change has been fully tested:
    • I have added tests to cover my changes.
    • All new and existing tests passed.
    • I have checked that this change does not introduce memory leaks.
    • I have used Valgrind or similar tools to check for potential issues.
  • I have given due consideration to all of the following potential concerns:
    • Scalability
    • Performance
    • Security
    • Thread-safety
    • Cloud-compatibility
    • Premature optimization
    • Existing deployed queries will not be broken
    • This change fixes the problem, not just the symptom
    • The target branch of this pull request is appropriate for such a change.
  • There are no similar instances of the same problem that should be addressed
    • I have addressed them here
    • I have raised JIRA issues to address them separately
  • This is a user interface / front-end modification
    • I have tested my changes in multiple modern browsers
    • The component(s) render as expected

Smoketest:

  • Send notifications about my Pull Request position in Smoketest queue.
  • Test my draft Pull Request.

Testing:

@hpcc-jirabot
Copy link

@miguelvazq
Copy link
Author

@GordonSmith Please review.

@@ -51,7 +52,9 @@ define([

// Hitched actions ---
_onSave: function (event) {
var dialog = dijit.byId("stubUserDialog");
var context = this;
Copy link
Author

Choose a reason for hiding this comment

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

The majority of the work is done here where I pass in the widget as a param when initialized since it is undefined. As well as clearing the fields if exception is thrown.

Copy link
Member

@GordonSmith GordonSmith left a comment

Choose a reason for hiding this comment

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

Did HPCCPlatformWidget.js actually change - lots of white space changes?

@miguelvazq
Copy link
Author

miguelvazq commented Jul 1, 2020

Did HPCCPlatformWidget.js actually change - lots of white space changes?

Yes, #362 the eslint format on save must have fired off white space changes.

if (!userInfo.init({ Username: this.userName })) {
if (!userInfo.init({
Username: this.userName,
Widget: userDialog
Copy link
Author

@miguelvazq miguelvazq Jul 1, 2020

Choose a reason for hiding this comment

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

Passed in param here.

<input name="newPasswordRetype" type="password" required="true" pwtype="verify" data-dojo-props="invalidMessage:'${i18n.PasswordsDoNotMatch}', placeHolder:'${i18n.MustContainUppercaseAndSymbol}'" data-dojo-type="dijit.form.ValidationTextBox" />
<input name="newPasswordRetype" type="password" required="true" pwtype="verify"
data-dojo-props="invalidMessage:'${i18n.PasswordsDoNotMatch}', placeHolder:'${i18n.MustContainUppercaseAndSymbol}'"
data-dojo-type="dijit.form.ValidationTextBox" />
Copy link
Member

Choose a reason for hiding this comment

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

Looks like you have enabled a HTML formatter? Can you roll back these changes (or adjust your formatter to not split the lines?

- Dismissed dialog due to an undefined widget
- Cleared input fields if passwords did not meet criteria

Signed-off by: Miguel Vazquez <miguel.vazquez@lexisnexisrisk.com>
@miguelvazq
Copy link
Author

@GordonSmith modified IDE to not format on save for selected options.

@HPCCSmoketest
Copy link
Contributor

Automated Smoketest: ✅
OS: centos 7.6.1810 (Linux 3.10.0-957.1.3.el7.x86_64)
GCC: gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
Host: ip-10-20-0-125.ca-central-1.compute.internal
Sha: 5c14805
Build: success
Milestone:Install hpccsystems-platform-community_7.10.3-closedown0.el7.x86_64.rpm
HPCC Start: OK
HPCC Stop: OK
HPCC Uninstall: OK
Time stats:

Prep time Build time Package time Install time Start time Test time Stop time Summary
9 sec (00:00:09) 745 sec (00:12:25) 118 sec (00:01:58) 22 sec (00:00:22) 20 sec (00:00:20) 0 sec (00:00:00) 14 sec (00:00:14) 928 sec (00:15:28)

@HPCCSmoketest
Copy link
Contributor

Automated Smoketest: ✅
OS: centos 7.8.2003 (Linux 3.10.0-957.1.3.el7.x86_64)
GCC: gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
Host: ip-10-20-0-116.ca-central-1.compute.internal
Sha: 5c14805
Build: success
Milestone:Install hpccsystems-platform-community_7.10.3-closedown0.el7.x86_64.rpm
HPCC Start: OK
HPCC Stop: OK
HPCC Uninstall: OK
Time stats:

Prep time Build time Package time Install time Start time Test time Stop time Summary
13 sec (00:00:13) 1036 sec (00:17:16) 123 sec (00:02:03) 23 sec (00:00:23) 17 sec (00:00:17) 0 sec (00:00:00) 16 sec (00:00:16) 1228 sec (00:20:28)

Copy link
Member

@GordonSmith GordonSmith left a comment

Choose a reason for hiding this comment

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

Looks ok - one question re the potential reuse?

@@ -51,7 +53,9 @@ define([

// Hitched actions ---
_onSave: function (event) {
var dialog = dijit.byId("stubUserDialog");
var context = this;
var dialog = this.params.Widget;
Copy link
Member

Choose a reason for hiding this comment

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

Passing an entire Widget via params will mean that this page cannot be displayed on its own or in a react component (which may be ok?)

Copy link
Author

@miguelvazq miguelvazq Jul 13, 2020

Choose a reason for hiding this comment

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

I envision us creating a dialog component that we pass in ...props to replace items such as these in the current world.

@GordonSmith
Copy link
Member

@ghalliday good to pull

@ghalliday
Copy link
Member

Reviewed-by: Gavin Halliday ghalliday@hpccsystems.com

@ghalliday ghalliday merged commit f5b1456 into hpcc-systems:candidate-7.10.x Jul 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants