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

feat(UploadPicker): Use @nextcloud/files filename validation by default #1310

Merged
merged 1 commit into from
Aug 13, 2024

Conversation

susnux
Copy link
Contributor

@susnux susnux commented Aug 1, 2024

This allows to make use of Nextcloud 30 server capabilities ("Windows support").

We keep the legacy options to be non breaking, but we can cleanup logic once we do a major release.

@susnux susnux added enhancement New feature or request 3. to review Waiting for reviews labels Aug 1, 2024
@susnux susnux requested review from skjnldsv and Pytal August 1, 2024 11:31
Copy link

codecov bot commented Aug 1, 2024

Bundle Report

Changes will increase total bundle size by 10.37kB ⬆️

Bundle name Size Change
@nextcloud/upload-esm 333.58kB 5.04kB ⬆️
@nextcloud/upload-esm-cjs 336.66kB 5.32kB ⬆️

@susnux susnux force-pushed the feat/validate-filename branch 3 times, most recently from 0e79542 to 884754e Compare August 5, 2024 11:31
…ault

This allows to make use of Nextcloud 30 server capabilities.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Comment on lines +13 to +19
<NcTextField v-if="canRename"
ref="textfield"
class="invalid-filename-dialog__input"
:error="!isValidName"
:helper-text="validationError"
:label="t('New filename')"
:value.sync="newName" />
Copy link
Contributor

Choose a reason for hiding this comment

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

I would also like default html validation.
From an accessibility perspective, I think it's best

minlenght ? maxlength ?
Ther's also no form with submit, I think this is important for accessibility ?

} finally {
const textfield = (this.$refs.textfield as ComponentPublicInstance)?.$el.querySelector('input')
if (textfield) {
textfield.setCustomValidity(this.validationError)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@skjnldsv it is set here as HTML validation

@susnux susnux merged commit deec5d8 into main Aug 13, 2024
17 checks passed
@susnux susnux deleted the feat/validate-filename branch August 13, 2024 15:18
@susnux susnux mentioned this pull request Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants