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

Make new text file tooltip messages update #27964

Merged
merged 1 commit into from
May 31, 2017
Merged

Make new text file tooltip messages update #27964

merged 1 commit into from
May 31, 2017

Conversation

phil-davis
Copy link
Contributor

Description

Related Issue

#27864

Motivation and Context

As the reason that the new text file name is invalid changes, the displayed text does not change.
The user needs to see an up-to-date error reason.

How Has This Been Tested?

  1. Create a folder with a file in it - e.g. file.txt
  2. Click "+", New text file, first blank out the whole file name and file type. "File name cannot be empty" is displayed in the tooltip -good.
  3. Now type a name that exactly matches the name of the other file in the folder - file.txt. The tooltip displays again, but it still says "File name cannot be empty".

After this fix, at step (3) the tooltip pops up and says "file.txt already exists"
and as you blank out the filename, put a single "." etc, the tooltip text changes.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

These are the other places that this type of tooltip code happens where the tooltip text gets updated on-the-fly. The same fix as in #27958 applies.

@@ -2102,6 +2102,7 @@
} catch (error) {
input.attr('title', error);
input.tooltip({placement: 'right', trigger: 'manual'});
input.tooltip('fixTitle');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note: I cannot see how to really test this one. To get to this try-catch the user has to be able to get past the char-by-char validation which actually will have caught the same validation checks. Looking through the code in try{} there are not any obvious other errors that will be thrown. In any case, this extra code will be needed here, just as in newfilemenu.js and #27958

@phil-davis
Copy link
Contributor Author

@DeepDiver1975 this is another little easy fix, if you are in the mood for reviewing.

@PVince81 PVince81 merged commit 57f6fc4 into master May 31, 2017
@PVince81 PVince81 deleted the tooltip-27864 branch May 31, 2017 15:21
@PVince81 PVince81 added this to the 10.1 milestone May 31, 2017
@PVince81
Copy link
Contributor

if needed for the tests, please backport to stable10

@phil-davis
Copy link
Contributor Author

Backport in #28055
This is exactly the same bug for the case when creating a new (text) file, compared to the other bug when renaming a file. It is much cleaner that both fixes appear consistently in the same point release series.

@lock
Copy link

lock bot commented Aug 2, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants