-
-
Couldn't load subscription status.
- Fork 406
Implement FileInput component for record page #4779
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
Conversation
05b5235 to
d675b88
Compare
…s. Remove the need for the canUploadFile boolean.
| key: recordId, | ||
| value: _recordSummary, | ||
| })} | ||
| canUploadFile={false} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The record selector header should be using the same input as the filter input, as in the search boxes are essentially filters. That would remove the need to use canUploadFile here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pushed f833138 for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right on. Thanks
| fileManifest?: FileManifest = undefined; | ||
| setFileManifest?: ((mash: string, manifest: FileManifest) => void) = undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default values should be removed here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pushed a7c65c6 to fix this
| during Sheet component creation. | ||
| --> | ||
| <script lang="ts"> | ||
| import type { FileManifest } from '@mathesar/api/rpc/records'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prettier seems to break due to the $$Props interface containing values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pushed a7c65c6 to fix this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh good catch. Thanks. Weird that TS didn't complain about this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@seancolsen The functionality looks good to me. I had a few comments.
I pushed the following commits to fix them:
- a7c65c6: Removes default values from an interface. It looks like it was probably an oversight, which also broke prettier. On a side note, prettier seems to pass when it isn't able to parse a file, we should take a look at that sometime.
- f833138 removes the
canUploadFileprop and uses the same input components used with filters for the record selector search boxes and default value input.- The search box in record selector is a textbox now and it is explicitly disabled, until we allow users to search by names or other properties of files.
- The default input is a textbox. The user could specify some valid default value if needed. I don't think validation is a priority for this one for the MVP.
Let me know if you disagree with any of these commits.
This PR can be merged once #4770 is merged.
Fixes item 9 on our Files UI checklist.
file_attachment_featureChecklist
Update index.md).developbranch of the repositoryDeveloper Certificate of Origin
Developer Certificate of Origin