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

[MU4 Issue] [Workspaces] Workspace Name Character Limit #11362

Closed
lengthwave opened this issue Apr 25, 2022 · 5 comments · Fixed by #14288
Closed

[MU4 Issue] [Workspaces] Workspace Name Character Limit #11362

lengthwave opened this issue Apr 25, 2022 · 5 comments · Fixed by #14288

Comments

@lengthwave
Copy link
Contributor

Describe the bug
There is an ambiguous error when typing reeeeeeeeaaaaaallly long Workspace names.
It could be better to give a fixed character limit prompt to the user instead of "cannot be used".

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Workspaces'
  2. Click on 'Create new workspace'
  3. Create a really, really long name
  4. See issue

Note: trying to test the limits of this, i did ignore the warning and was able to get it to accept it. Surprisingly, nothing broke with such a long name.

Expected behavior
A warning that tells that workspace name should be less than X characters.

Screenshots
Screen Shot 2022-04-25 at 6 54 19 PM
Screen Shot 2022-04-25 at 6 55 18 PM
Screen Shot 2022-04-25 at 6 55 34 PM

Platform information
OS: macOS 12.2, Arch.: x86_64
MuseScore version (64-bit): 4.0.0-2214419458
revision: github-musescore-musescore-df96a36

@Tantacrul Tantacrul added the P2 Priority: Medium label Apr 25, 2022
@Tantacrul
Copy link
Contributor

I suggest a cap of 24 characters. A user should not be able to enter more than that in the text field.

@Tantacrul Tantacrul added this to To do in [MU4.0 - GENERAL INTERACTIVE DIALOGS] via automation Apr 25, 2022
@Tantacrul Tantacrul added this to Needs triage in [MU4.0 BETA1] via automation Apr 25, 2022
@RomanPudashkin RomanPudashkin added the good first issue Issues suitable for first-time contributors. See https://github.com/musescore/MuseScore/contribute label Aug 9, 2022
@DmitryArefiev DmitryArefiev changed the title [MU4 Issue] Workspace - Workspace Name Character Limit [MU4 Issue] [Workspaces] Workspace Name Character Limit Aug 12, 2022
@Tantacrul
Copy link
Contributor

@HemantAntony - wondering if you'd like this too?

@HemantAntony
Copy link
Contributor

I'll take a look!

@vpereverzev vpereverzev moved this from Needs triage to Low priority in [MU4.0 BETA1] Aug 29, 2022
@Tantacrul Tantacrul removed this from Low priority in [MU4.0 BETA1] Oct 18, 2022
@Tantacrul Tantacrul added this to To triage in [MU4.0 RELEASE] via automation Oct 18, 2022
@Tantacrul Tantacrul moved this from To triage to Issues in [MU4.0 RELEASE] Oct 18, 2022
@poypoyan
Copy link
Contributor

poypoyan commented Nov 1, 2022

The workspace name is checked according to mu::io::isAllowedFileName function in src/framework/global/io/path.cpp. Also, this function is only used for this issue, checking the workspace name (here in newworkspacemodel.cpp). The relevant code in path.cpp is:

    // Check for trailing periods or spaces
    if (fn.back() == '.' || fn.back() == ' ') {
        return false;
    }

    // Check for pathnames that are too long
    if (fn.size() > 96) {
        return false;
    }

The error in the first image is due to trailing space, and not due to length. Of course the code also shows that the max length is actually 96. Hmmm... should we modify the path.cpp or the newworkspacemodel.cpp?

RomanPudashkin added a commit to RomanPudashkin/MuseScore that referenced this issue Nov 7, 2022
@RomanPudashkin RomanPudashkin moved this from Medium Priority to In progress in [MU4.0 RELEASE] Nov 7, 2022
RomanPudashkin added a commit to RomanPudashkin/MuseScore that referenced this issue Nov 7, 2022
RomanPudashkin added a commit to RomanPudashkin/MuseScore that referenced this issue Nov 7, 2022
RomanPudashkin added a commit to RomanPudashkin/MuseScore that referenced this issue Nov 10, 2022
RomanPudashkin added a commit to RomanPudashkin/MuseScore that referenced this issue Nov 10, 2022
[MU4.0 - GENERAL INTERACTIVE DIALOGS] automation moved this from To do to Done Nov 11, 2022
[MU4.0 RELEASE] automation moved this from In progress to Done Nov 11, 2022
@DmitryArefiev DmitryArefiev removed the good first issue Issues suitable for first-time contributors. See https://github.com/musescore/MuseScore/contribute label Nov 11, 2022
@DmitryArefiev
Copy link
Contributor

Fixed in #14288

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 Priority: Medium
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

7 participants