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] Remove the artificial 65 char limit and fix caption on black theme #1876

Merged
merged 6 commits into from
Jan 25, 2022
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
Copy link
Member

Choose a reason for hiding this comment

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

👍


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