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

fix: add missing text #13629

Merged
merged 5 commits into from
Sep 30, 2024
Merged

fix: add missing text #13629

merged 5 commits into from
Sep 30, 2024

Conversation

standeren
Copy link
Contributor

@standeren standeren commented Sep 25, 2024

Description

Actually, this error message is not sufficient. We should use the same text as when creating a new model:
"schema_editor.invalid_datamodel_upload_filename": "Filnavnet er ugyldig. Du kan bruke tall og store og små bokstaver fra det norske alfabetet, og understrek, punktum og bindestrek.",

But this message is too long to be in a toast.

The best solution for handling this error, invalid name error, is to show an error somewhere near the Last opp button that the user can close, or that closes by itself when triggering another event.

However, the easiest solution with no more code than necessary is using a native alert:

Skjermbilde 2024-09-26 kl  14 31 07

Also added to the error message that the filename must start with a letter which the RegEx limits, but was not reflected in the original error message. See issue

Related Issue(s)

  • #{issue number}

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing done (required)
  • Relevant automated test added (if you find this hard, leave it and we'll help out)

@github-actions github-actions bot added area/data-modeling Area: Related to data models - e.g. create, edit, use data models. solution/studio/designer Issues related to the Altinn Studio Designer solution. labels Sep 25, 2024
Copy link

codecov bot commented Sep 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.30%. Comparing base (34a57f0) to head (92e44a9).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13629      +/-   ##
==========================================
- Coverage   94.30%   94.30%   -0.01%     
==========================================
  Files        1534     1534              
  Lines       20899    20898       -1     
  Branches     2515     2515              
==========================================
- Hits        19709    19708       -1     
  Misses        945      945              
  Partials      245      245              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@standeren standeren changed the title Add missing texts fix: add missing texts Sep 25, 2024
@standeren standeren marked this pull request as ready for review September 26, 2024 12:33
@standeren standeren added skip-releasenotes Issues that do not make sense to list in our release notes added-to-sprint labels Sep 26, 2024
@standeren standeren changed the title fix: add missing texts fix: add missing text Sep 26, 2024
@JamalAlabdullah JamalAlabdullah self-assigned this Sep 30, 2024
Copy link
Contributor

@JamalAlabdullah JamalAlabdullah left a comment

Choose a reason for hiding this comment

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

Bra jobba🙂

@standeren standeren force-pushed the fix/add-missing-error-text branch from 50362cc to 92e44a9 Compare September 30, 2024 13:10
@standeren standeren removed their assignment Sep 30, 2024
Copy link
Contributor

@ErlingHauan ErlingHauan left a comment

Choose a reason for hiding this comment

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

Tested OK with valid and invalid names

@ErlingHauan ErlingHauan merged commit e389821 into main Sep 30, 2024
6 of 7 checks passed
@ErlingHauan ErlingHauan deleted the fix/add-missing-error-text branch September 30, 2024 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
added-to-sprint area/data-modeling Area: Related to data models - e.g. create, edit, use data models. skip-releasenotes Issues that do not make sense to list in our release notes solution/studio/designer Issues related to the Altinn Studio Designer solution.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants