-
Notifications
You must be signed in to change notification settings - Fork 126
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
v4.0 #262
Comments
For TypeScript support, I am currently stuck on supporting advanced imports. It seems like to only way to support advanced imports is to manually re-export all component types under their corresponding advanced import path. |
Other than that, type definintions should be largely complete. |
@MrCreeper1008 in which branch are the typescript definitions? I have an idea to fix the import that want to check |
It's on |
I think we should come up with a better way of importing components, because imo current way of doing it is a bit cluncky. Maybe we should consider supporting tree-shaking? |
@couds we should also probably rewrite all class components with react hooks, since react recommends hooks over classes. |
Hi @MrCreeper1008 I think we can do it but that is not a breaking change so we can do it later (v4.1 for example) so let out it as optional for the 4.0. |
@MrCreeper1008 @couds Maybe create a dedicated branch for that? Or can we just send pull requests on a per component basis? |
Typedefs for compoentns are finished. We're just considering changing how components are imported, so we're holding this off until that is settled |
Hi, loving the work! Just wondering whether you have an ETA for this update? It seems almost there? |
yea it is almost there. waiting @couds to rewrite imports. |
Hi @MrCreeper1008 Thanks a lot for all the work you are doing. This couple a week had been crazy for me. (Changing job and finishing a lot of stuff), I think I will have finally time after Sep 15. I will try my best to do it the weekend of that week. T_T |
if you want i can finish the rest so you can focus on your stuff. |
Hi, love the library and 4.0 looks to be a great update. Is there anything we can do to help push the project closer to a 4.0 release? 😄 |
The only big thing left to do is closing #276, so it would be great if you could help with that. |
Also would be great if you could help improve the documentation. |
I should be able to finish v4 this week, but it will be released definitely by next week. Sorry for the delays. There are too much stuff going on right now. Update: all changes are implemented! still deciding whether to rewrite class components. @couds |
I am using #next in a hobby application - have noticed that a few of the type exports are missing from index.d.ts, namely:
Not sure if this is overlooked, or intentional, but thought better to point it out :) D |
Turns out the memory issue is an issue on |
Reading that issue, it looks like the underlying issue may be with Jest itself--the issue was crossposted here: jestjs/jest#10550 Not much activity on it. I take it that you're not using |
My guess is that the issue only happens in large projects with many test cases. A solution is for us to ship a commonjs version of our code that you can import in tests (like |
Can you explain to me what changed between v3 and v4 to expose this issue? |
in v3 import statements are transpiled but in v4 they aren't anymore to enable tree shaking. |
Marked breaking changes. |
Some missing features are added when I am writing the new documentation. Decided to also perform some housekeeping tasks in v4 to tidy up the code base. |
Hi @ALL I took a while but finally we have a release candidate for V4. You can try it installing the next tag If not big issues are found I will release it next week Thanks for the patience! |
@couds I have been using the v4 branches for a while, and this seems to break quite a lot that was previously working in terms of types in particular, but also functionally - is there an easy way to see what has changed, or view the docs so that I can work out how to update these? One thing in particular that I think will need updating is the types on renderAs - I am using Gatsby, and it won't let me use a gatsbyLink as renderAs, which is pretty crucial e.g. for navigation. (#314 (comment)) I'm going to take a look and see if there is anything I can do about it, but thought I would let you know early! |
can you open a new issue for the problem you have with gatsby and renderAs? as for the changelog i think @couds is documenting all the changes in |
Me again (perhaps it's only me that's using this unstable branch!) - I have found that the changes in RC.3 have made gatsby fail to build:
Everything works fine with RC.2, but 3, 4 and 5 throw this. |
Hi @davepwsmith I made a mistake building RC.3, check the latest one (Should be RC.5) it should work correctly |
Afraid not @couds - neither .3, .4 or .5 work, all with the same error. |
Weird. I will check this afternoon what its broken on the build and deploy a RC.6. If possible can you share a simple repo to reproduce the issue? Thanks |
@davepwsmith Fixed on RC.7 Thanks for reporting. |
Just to confirm that this is all good at my end with a more complicated example than the one I gave you! Thanks. |
Hi. Some typescript type definition maybe different. An type mismatch error occurs even if I use it according to the usage of bulma documents. <Menu>
<Menu.List>
<Menu.List.Item>
/* ↓ Type mismatch.. 'string[] | ReactElement<any, string | JSXElementConstructor<any>>[]' */
hogehoge
</Menu.List.Item>
</Menu.List>
</Menu> My team is using RC.7. |
Hi @bino98 I will take s look. Thanks! |
For what it's worth, unless you are specifically trying to restrict what people put inside these elements, I think you will pretty much always want ReactNode? It is the type that the react typings use for children (e.g. in PropsWithChildren<>). It is a very broad type though, so if you did want to restrict further than that I would understand! https://github.com/DefinitelyTyped/DefinitelyTyped/blob/2034c45/types/react/index.d.ts#L194 |
Thank you comments. I forgot to write past comment, even if use a ReactNode in for examples.. <Menu>
<Menu.List>
<Menu.List.Item>
<HogeLabel>hogehoge</HogeLabel>
</Menu.List.Item>
</Menu.List>
</Menu> sorry if I'm wrong |
Hi @bino98 - sorry my comment was directed at @couds. You are correct that the types aren't right. @couds I can PR for this - but I also noticed that the title attribute is already typed as ReactNode... this means that you can put just about anything as the title here, extending to basically a whole other website! Should this not just be "string"? I am struggling to even get the "next" branch set up at the moment though, npm i is complaining about package hashes and babel won't run... |
Hi @davepwsmith I will take a look about the issue with the env. About the title, I prefer to keep it as a ReactNode, there are scenarios where we could want a more complex title (and anchor or anything else) |
@davepwsmith I pushed the fix to the I was not able to reproduce the issue installing the package. btw I recommend to use |
* Upgrade Bulma; add spacing modifiers * Remove List component * Update CHANGELOG.md * Move bulma to peerDependencies * Bump lodash from 4.17.15 to 4.17.19 Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](lodash/lodash@4.17.15...4.17.19) Signed-off-by: dependabot[bot] <support@github.com> * Remove yarn.lock * Audited packages * fix: add missing Table.Container element (#274) * fix: add missing Table.Container element * Address review feedback * fix: add missing table hoverable prop (#273) * Rewrite TypeScript Definitions (#252) * Define <Element /> and <Box /> component types * Add typedefs for more components * Add typedefs for more components * Try to add support for renderAs prop * brute forced every single html elements to apply dynamic props based on renderAs * removed some html elements because too many cases breaks ts * removed more html elements for renderAs props * removed more html elements for renderAs props * Tries to fix renderAs dynamic prop typing * Clean up the code * Add types for more components * Tidy up code * Add types for more components * Add types for the remaining components * clean up the code * remove ref attribute; fix menu type def * Add Table.Container type * Add Table hoverable prop * Remove List component * Remove sass and all dependencies #262 (#278) * remove sass and all dependencies * Fix eslint issues * update dev dependencies * update Readme * Fix prettier errors * fix button ref test * change Object.keys for Object.values * WIP: split some component typedefs into individual files. * Move index typedef to root * Move index typedef to src * Move rest of component typedefs into their own files * Trying to make tree-shaking work * Add clickable helper * Update bulma peer dep to 0.9.1 * Fix jest tests not able to run * Upgrade bulma peer dep to 0.9.2 * Refactor responsive modifier props * Change storybook import alias * Rewrite import statements in stories to use named exports * Update typedefs * Fix Jest tests * Fix decreased test coverage * Add support for flexbox helpers; add spacing helpers typedef * Add pagination first last pages (#283) * feat: add pagination first last pages originally done by @haflinger - ref: #100 * feat: add story for the showFirstLast feature in pagination * feat: add size, position and rounded props to pagination * fix: remove duplicated checking on first/last page btns * feat: update typescript def for the new pagination props * Add test case for showFirstLast prop Co-authored-by: Kenneth Ng <ngcreeper@outlook.com> * Add missing TypeScript exports * Add documentation (#251) * init documentation * fix dependencies * import only used components * Improve docs distribution create folder/files structure * Add npm script for starting docs website * Add columns basic documentation * documentation (#266) * documentation * Update card.md * Update tiles.md * Update box.md * Update card.md * Update content.md * Update media.md * new * Update gap.md * Update nesting.md * Update options.md * Update responsiveness.md * Update card.md * Update dropdown.md * Update menu.md * Update message.md * Update navbar.md * Update pagination.md * Update panel.md * Update tabs.md * Update box.md * Update button.md * Update icon.md * Update notification.md * Update progress-bar.md * Update tag.md * Update container.md * Update level.md * new * new * new * Tidy up code * Update column size documentation * Fix small typo in column size doc * Update column responsiveness doc * Update column nesting doc * Accidentally removed Section import in column nesting doc * Add missing code example in column responsiveness doc * Update column gap doc * Update column options doc * Update column basics doc * Update container doc * Update level doc Co-authored-by: Kenneth <kenneth.ng.5226@outlook.com> * Update bulma to 3.4.0 * Add pagination first last pages (documentation) (#284) * docs: add doc for pagination first/last btns, size, position and rounded * chore: code consistency Co-authored-by: John Benavides <john.elric@gmail.com> Co-authored-by: Quadri Sheriff <59125401+Quadrisheriff@users.noreply.github.com> Co-authored-by: Yuen Ying Kit <yingkityuen@gmail.com> * Documentation: Use `next` branch of library * Update pagination documentation * Update import statements in docs * Fix incorrect type path * Fix incorrect type path * Update README.md * Move old logo to documentations folder * Fix incorrect bulma version * Fix missing array type for Select * Remove Button state prop * Fix Warning: Failed prop type: Invalid prop value supplied to Select (#288) * Fix Warning: Failed prop type: Invalid prop value supplied to Select * Fix stylistic issues - Format code with Prettier - Use double quote for JSX strings - Introduce local defaultValue function * Remove tests that check no error is thrown * Fix defaultValue function * Group Select value PropTypes tests * Move value PropTypes tests in Select component group * Use dot notation * Change input-file to a controled component * 4.0.0-0 * update typescript definitions for input-file * Implement state props for Form.Input * Remove loading prop from Form.Input * Add rounded prop to Form.Input * Migrate to storybook addon-docs from docusaurus (#289) * Add addon-essentials storybook plugin * Rewrite <Box /> doc * WIP: implement breadcrumb doc * WIP: Implement Breadcrumb doc * Implement Breadcrumb doc * Update box doc * Add button doc * Implement Card doc * Add theme to storybook * WIP: Add column doc * Add Columns doc * Add Columns doc * Add Container doc * Add Content doc * WIP: add dropdown doc * Add Dropdown doc * Add Footer doc * Implement Form doc * WIP: add Form.Input doc * Implement Form.Input doc * Document rounded prop of Form.Input * Allow override of renderAs of Form.Input; remove default HTML attrs propTypes * Add is-flex helper support * Also support other display classes via display modifier prop * Forgot to apply display prop to class names; fix test * Support text size 7 * Add support for font family modifiers * Add is-sr-only modifier support * Add doc landing page; Add renderAs and modifier doc * Add checkbox doc * Remove some deprecated packages; audited packages * Revert storybook upgrade * WIP: Textarea doc * Add some missing Form.Textarea props * Add Textarea doc; remove Element story code * Remove loading prop from Form.Textarea and Form.Input * Add rounded props for Form.Select * WIP: add Select doc * Finish Select doc * Add various state props for Select * Add Radio doc * Fix failing InputFile test * Rename InputFile value prop to files; update InputFile type * Add Menu doc * Add message doc * Fix missing Modal ts props * Fixes issues with modal children (#302) (#303) * Revert "Fix missing Modal ts props" This reverts commit f2e1a0a. * Update modal types to include document, children, classname * Add string column widths to types (#304) * 4.0.0-1 * Add Breadcrumb.Item component to replace Breadcrumb items prop (#293) * WIP: Add Breadcrumb.Item component * Add test and types for Breadcrumb.Item * Add centered prop to InputFile * Add InputFile doc * Add InputFile prop table * Add InputFile label control * Heading will now render appropriate header element based on supplied size. * Revert prev commit * Add Heading doc * Add missing m/p spacing helpers * Use default export on component level ts definition (#308) * add icon to dropdown props definition (#310) Co-authored-by: Matt McCorry <matt@auktechnologies.com> * 4.0.0-2 * Update docs and improve/normalize components props (#309) * Update columns docs * add Block component * fix tests * more docs * add more components to the docs * added all elements * Add missing links to bulma.io documentation * [WIP] use Element.proptypes and defaultProps instead of modifier * update can i use * use Element proptypes ans defaultprops * breadcrumb component * add card * refactor dropdow to stop using class component * dropdown docs * Menu component * Enable classProperties in babel * Fix storybook webpack issue * Add level doc * Message docs * Fix render as a color constants * add bulma docs link to message story * update modal component * update snapshots * remove modifier dependency * remove modifiers folder * if button type its reset or submit force renderAs button * remove modifiers import from d.ts files * finish Element docs (for now) * normalize normalize position (center -> centered) * docs improvements * delete documentation folder * more default props * fixes * update reponsive text alignment * Rename textAlignment to textAlign * even more... * refactor pagination to functional component * remove babel plugin not need it anymore * update dependencies * add pagination docs * Panel docs * tabs docs * dome Form component docs * Fix input tests * Texta area and tests * Select docs * Checkbox * Radio docs * Add label story * Passdown size prop from Field to childrens * update test and lower coverage (for now) * Finish form docs * remove unused files * - Container Docs - Remove Fluid from container - Add fluid as a possible value of breakpoint - Add Max prop to container * Level docs * rename position to align * update Changelog * remove Media.Content component (duplicates Content Component) * Hero * Add Section docs * Update Footer docs * add Tile docs * remove notification and color props from Tile * improve Tile docs * Improve responsive gap prop * remove unused mock Co-authored-by: Kenneth <kenneth.ng.5226@outlook.com> * 4.0.0-RC.0 * - Normalize align on Navbar.Container - Add size to Navbar (is-spaced) - Normalize non-responsive display prop - Add invisible prop to all components - Ignore size on Hero if hasNavbar is true * small fixes * 4.0.0-RC.1 * add relative to display prop allowed values * add text prop to icon component * Fix build and tests * improve order of common proptypes * Fix #313 add size as optional prop * Fix issue with RenderAsComponent type (#316) Uses ElementType (https://flow.org/en/docs/react/types/#toc-react-elementtype) to fix #314 * Allow Color and size custom props Add Color custom&extend docs * - Fix tests - Remove proptypes from bundle * normalize Statues * Improve Changelog * 4.0.0-RC.2 * Test package configurations * Add hero halfheight size * Fix test runner * Allow pass IconType to control to use on isIcon function * 4.0.0-RC.3 * update bulma peer dependency * fix package json files field * 4.0.0-RC.4 * include ts definitions on package * 4.0.0-RC.5 * add shades as valid buttons colors * fix imports on TS (Gatsby) * 4.0.0-RC.6 * add cjs and esm builds * 4.0.0-RC.7 * Fix Menu.Item.List children proptype * More improvements * 4.0.0-RC.8 * build library as a prepublish step * add renderAs to TagGroup * fix prepublish script * update travis to node 14 * regenerate package-lock * Try to fix CI Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> Co-authored-by: John <john.elric@gmail.com> Co-authored-by: Yuen Ying Kit <yingkityuen@gmail.com> Co-authored-by: Quadri Sheriff <59125401+Quadrisheriff@users.noreply.github.com> Co-authored-by: 1r3n33 <59848434+1r3n33@users.noreply.github.com> Co-authored-by: John Benavides <john.benavides@gartner.com> Co-authored-by: David Smith <davepwsmith@users.noreply.github.com> Co-authored-by: Matt McCorry <mccorry@gmail.com> Co-authored-by: Matt McCorry <matt@auktechnologies.com>
congrats for v4 release! 🎉 |
Thank you 😄 |
This is an issue tracking this library's upgrade to v4.0.
New features:
<List />
componentis-clickable
helperis-max-desktop
andis-max-widescreen
for Containerdisplay
prop without viewport modifiers. (5f1b1eb)is-size-7
(2162f3f)is-sr-only
modifier (e9fc3d2)table-container
component (fix: add missing Table.Container element #274)hoverable
prop forTable
component (fix: add missing table hoverable prop #273)rounded
prop forForm.Select
component (aed5774)Form.Select
(d2afa6d)name
prop ofForm.Radio
is no longer required. (b365663)Breadcrumb
item
prop and replace it withBreadcrumb.Item
RemoveButton can have multiple state at once - theloading
Button prop in favor of a unifiedstate
prop that already exists.state
prop will be removed because it can only take one state at a time. (0da8632) Reverting this, does not make sense to have focus, hover and/or hover at the same timeand loading(UPDATE loading state is applied to Control instead of Input, removing) state props forForm.Input
. (aff9690)rounded
prop forForm.Input
(corresponds tois-rounded
) (af1c3a2).centered
prop forInputFile
Form.Textarea
default rows of 4. (2153d5b)has-fixed-size
support forForm.Textarea
(2153d5b)Form.Textarea
(2153d5b) Reverting this, does not make sense to have focus, hover and/or hover at the same timeForm.InputFile
is now a controlled componentBREAKINGWon't do, the user will select the appropiate element with renderAsHeading
will now pick the appropriate header element based on the supplied size. For example,size={4}
tellsHeading
to renderh4
under the hood. Default size will now be 3renderAs
for various components for consistency's sake. Except Table because with any other component will not workHousekeeping:
bulma
topeerDependency
([VOTE] Change Bulma dependency to peerDependenc. and remove the import of the styles from this library #258)cc @couds
edit: marked breaking changes.
The text was updated successfully, but these errors were encountered: