Skip to content

Commit

Permalink
Metadata dropzone: disable click, fix JSON drop (#3707)
Browse files Browse the repository at this point in the history
* Metadata dropzone: disable click, fix JSON drop

* adjust changelog entry
  • Loading branch information
fiskus authored Aug 31, 2023
1 parent 56425e7 commit 9dc817a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 6 additions & 2 deletions catalog/app/containers/Bucket/PackageDialog/MetaInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ export const MetaInput = React.forwardRef<HTMLDivElement, MetaInputProps>(
onChange(contents)
} else {
try {
JSON.parse(contents as string)
onChange(JSON.parse(contents as string))
} catch (e) {
notify('The file does not contain valid JSON')
}
Expand Down Expand Up @@ -318,7 +318,11 @@ export const MetaInput = React.forwardRef<HTMLDivElement, MetaInputProps>(

const isDragging = useDragging()

const { getRootProps, isDragActive } = useDropzone({ onDrop })
const { getRootProps, isDragActive } = useDropzone({
onDrop,
noClick: true,
noKeyboard: true,
})

return (
<div className={className}>
Expand Down
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Entries inside each section should be ordered by type:
* [Fixed] Fix Header's orange flash on load ([#3487](https://github.com/quiltdata/quilt/pull/3487))
* [Fixed] Fix code sample for package push ([#3499](https://github.com/quiltdata/quilt/pull/3499))
* [Fixed] Make bookmarks optional (and fix Embed listings broken in #3697) ([#3705](https://github.com/quiltdata/quilt/pull/3705))
* [Fixed] Disable opening file picker on metadata click, and fix dropping JSON as metadata ([#3707](https://github.com/quiltdata/quilt/pull/3707))
* [Added] Add filter for users and buckets tables in Admin dashboards ([#3480](https://github.com/quiltdata/quilt/pull/3480))
* [Added] Add links to documentation and re-use code samples ([#3496](https://github.com/quiltdata/quilt/pull/3496))
* [Added] Show S3 Object tags ([#3515](https://github.com/quiltdata/quilt/pull/3515))
Expand Down

0 comments on commit 9dc817a

Please sign in to comment.