-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add PackageUpload component #8
Conversation
2c19338
to
010700b
Compare
Also add Markdown, FileUpload and StickyFooter
010700b
to
8ef74ed
Compare
Also split render and upload into separate component
A better explanation of the to-do list (related: #22 (comment)): Add SelectSearch componentThis is currently Select and uses an abstraction that should make changing the actual select component easier. Some points:
This is a component that has given me a lot of trouble. I really like the selectors in the existing upload form but finding one that "works with Chakra" has been difficult. The lack of components in Chakra like a date picker and multi select has made building these components really important but I haven't managed to find a good solution. koolamusic/chakra-ui-autocomplete seems to be the only existing select component that has everything that's needed but after a quick mess around I found it quite complex to work with (although this shouldn't be a big deal due to the abstraction of our own Move
|
const options: SelectOption[] = [ | |
{ name: "Category name 1", value: "category-slug-1" }, | |
{ name: "Category name 2", value: "category-slug-2" }, | |
{ name: "Category name 3", value: "category-slug-3" }, | |
]; |
Remove top margin from first item in README
This is probably really simple but I haven't thought of a solution (probably my lack of CSS knowledge). Currently, if you upload a mod zip where the first line of the README is a header (which is common), the top margin of the header causes a weird gap between the header and the outline of the markdown preview box. Example:
Standardise background colours
Right now useColorModeValue
is used in 2 places, the background of the footer with the upload button and the background of the file upload component.
Both of these currently use "gray", "gray"
but there's probably a much better colour based on the theme that can be used to have a less drastic colour change from the background colour. I haven't looked into reading values from the Chakra theme or played around with different colours (also trying Chakra's colour system) to find what would work here but it doesn't really fit in well the way it is at the moment. I think the accent colour we use for these 2 places could be exported or stored in the theme so that it can easily be referenced, as already it has 2 references and this is just implementing one page. I'm not sure where this would be put but looking at how Chakra's theme works will probably help.
Change decompressing message to loading icon
Right now there are 2 slightly weird loading texts, "Loading..." and "Decompressing...". It would be nice to instead show a loading spinner here. It might also make sense to have some animations as the state changes but I'm not sure on the best way to do that.
Use Chakra form components
For example, FormControl
, FormLabel
and FormErrorMessage
. When I experimented with FormControl
it broke some of the styling but this should be a fairly simple change.
Fix typing for ref
At the moment, the ref
used from register
from react-hook-form is set to any
instead of the correct type. This was more complex than I expected so I left it for later.
I'm unsure where to put API token fetching (currently |
This fixes a flash of `[object Object]` before the input is cleared after selecting an item
I'm merging this since it's currently blocking a lot as it has much more than just the new components. Pending to-dos will be in a separate PR. |
Closes #39 and #46
Slide
toDrawer
apiToken
to localStorageuseColorModeValue
) (Initial updates to PackageUpload and related components #164)FileUpload
componentFileUpload
component