Skip to content

Commit

Permalink
[Fix] Remove the artificial 65 char limit and fix caption on black th…
Browse files Browse the repository at this point in the history
…eme (#1876)

* fix 65 limit and black caption

* lingui extract

* lingui extract

* fix test

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
  • Loading branch information
3 people authored Jan 25, 2022
1 parent a46d74b commit a114dcf
Show file tree
Hide file tree
Showing 10 changed files with 4 additions and 32 deletions.
6 changes: 3 additions & 3 deletions packages/common-components/src/TextInput/TextInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ const useStyles = makeStyles(
textAlign: "center",
padding: `${constants.generalUnit}px`,
transform: "translateX(-50%)",
color: palette.common.white.main,
backgroundColor: palette.common.black.main,
color: palette.additional["gray"][1],
backgroundColor: palette.additional["gray"][8],
...typography.body2,
fontWeight: typography.fontWeight.bold,
zIndex: zIndex?.layer3,
Expand All @@ -151,7 +151,7 @@ const useStyles = makeStyles(
left: "50%",
borderWidth: constants.generalUnit,
borderStyle: "solid",
borderColor: ` ${palette.common.black.main} transparent transparent transparent`
borderColor: ` ${palette.additional["gray"][8]} transparent transparent transparent`
},
"&.error": {
// backgroundColor: palette.error.main,
Expand Down
9 changes: 1 addition & 8 deletions packages/files-ui/cypress/tests/file-management-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ describe("File management", () => {
})

it("can rename a file with error handling", () => {
const newName = "awesome new name"
const newName = "awesome new name that is pretty long and it shouldn't matter that much anyway"

cy.web3Login({ clearCSFBucket: true })

Expand Down Expand Up @@ -374,13 +374,6 @@ describe("File management", () => {
createFolderModal.createButton().should("have.attr", "disabled")
createFolderModal.errorLabel().should("be.visible")
createFolderModal.body().should("contain.text", "Please enter a name")

// ensure a folder can't be created if name exceeds 65 characters
createFolderModal.folderNameInput().type("{selectall}{del}")
createFolderModal.folderNameInput().type("cgsxffymqivoknhwhqvmnchvjngtwsriovhvkgzgmonmimctcrdytujbtkogngvext")
createFolderModal.createButton().should("have.attr", "disabled")
createFolderModal.errorLabel().should("be.visible")
createFolderModal.body().should("contain.text", "Name too long")
})

it("can see storage space summary updated accordingly", () => {
Expand Down
1 change: 0 additions & 1 deletion packages/files-ui/src/Utils/validationSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ export const nameValidator = object().shape({
name: string()
.trim()
.min(1, t`Please enter a name`)
.max(65, t`Name too long`)
.required("A name is required")
.test(
"Invalid name",
Expand Down
3 changes: 0 additions & 3 deletions packages/files-ui/src/locales/de/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -550,9 +550,6 @@ msgstr "Meine Dateien"
msgid "Name"
msgstr "Name"

msgid "Name too long"
msgstr "Name zu lang"

msgid "New folder"
msgstr "Neuer Ordner"

Expand Down
3 changes: 0 additions & 3 deletions packages/files-ui/src/locales/en/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -553,9 +553,6 @@ msgstr "My Files"
msgid "Name"
msgstr "Name"

msgid "Name too long"
msgstr "Name too long"

msgid "New folder"
msgstr "New folder"

Expand Down
3 changes: 0 additions & 3 deletions packages/files-ui/src/locales/es/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -554,9 +554,6 @@ msgstr "Mis Archivos"
msgid "Name"
msgstr "Nombre"

msgid "Name too long"
msgstr ""

msgid "New folder"
msgstr "Nuevo Folder"

Expand Down
3 changes: 0 additions & 3 deletions packages/files-ui/src/locales/fr/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -554,9 +554,6 @@ msgstr "Mes Fichiers"
msgid "Name"
msgstr "Nom"

msgid "Name too long"
msgstr "Le nom est trop long"

msgid "New folder"
msgstr "Nouveau dossier"

Expand Down
3 changes: 0 additions & 3 deletions packages/files-ui/src/locales/no/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -550,9 +550,6 @@ msgstr "Mine filer"
msgid "Name"
msgstr "Navn"

msgid "Name too long"
msgstr "Navnet er for langt"

msgid "New folder"
msgstr "Ny mappe"

Expand Down
2 changes: 0 additions & 2 deletions packages/storage-ui/src/Utils/validationSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export const nameValidator = object().shape({
name: string()
.trim()
.min(1, t`Please enter a name`)
.max(65, t`Name too long`)
.required("A name is required")
.test(
"Invalid name",
Expand All @@ -19,7 +18,6 @@ export const bucketNameValidator = (bucketNames: Array<string | undefined>) => o
name: string()
.trim()
.min(1, t`Please enter a name`)
.max(65, t`Name too long`)
.required(t`Bucket name is required`)
.test(
"Invalid name",
Expand Down
3 changes: 0 additions & 3 deletions packages/storage-ui/src/locales/en/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,6 @@ msgstr "Move to..."
msgid "Name"
msgstr "Name"

msgid "Name too long"
msgstr "Name too long"

msgid "New Key"
msgstr "New Key"

Expand Down

0 comments on commit a114dcf

Please sign in to comment.