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

Remove sass and all dependencies #262 #278

Merged
merged 7 commits into from
Aug 23, 2020
Merged

Conversation

couds
Copy link
Owner

@couds couds commented Aug 18, 2020

Remove all sass and dependencies associated to the saas build for V4 (part of #262 )

There are some side effects of removing the saas from the build

  • The Dropdown component now do not have the icon, (I added a new prop Icon that will be a React Component so the user can add his own icon like <Dropdown icon={<MyIcon />} > ...
  • I removed the icon prop from the Icon component now the Icon will only create the space for the icon

@couds couds requested a review from kennethnym August 18, 2020 09:18
@couds couds changed the title remove sass and all dependencies Remove sass and all dependencies #362 Aug 18, 2020
@couds couds changed the title Remove sass and all dependencies #362 Remove sass and all dependencies #262 Aug 18, 2020
@couds couds marked this pull request as ready for review August 18, 2020 10:06
Copy link
Collaborator

@kennethnym kennethnym left a comment

Choose a reason for hiding this comment

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

hi, just a couple changes:

  • you can replace all Object.keys(obj).map(key => obj[key]) with Object.values(obj). (i didnt comment them all)
  • i noticed you rewrote some class components but not all. will you do it here or in another separate pr?

@@ -8,7 +8,7 @@ import modifiers from '../../modifiers';
import Element from '../element';

const breakpoints = [null].concat(
Object.keys(CONSTANTS.BREAKPOINTS).map(key => CONSTANTS.BREAKPOINTS[key]),
Object.keys(CONSTANTS.BREAKPOINTS).map((key) => CONSTANTS.BREAKPOINTS[key]),
Copy link
Collaborator

Choose a reason for hiding this comment

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

using Object.values(CONSTANTS.BREAKPOINTS) would be simpler here.

Copy link
Owner Author

Choose a reason for hiding this comment

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

I totally forgot about this. this line change on the PR because the prettier change the rules. I will change it

@@ -6,7 +6,7 @@ import modifiers from '../../../modifiers';
import Element from '../../element';

const sizes = [null, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].concat(
Object.keys(CONSTANTS.SIZES).map(key => CONSTANTS.SIZES[key]),
Object.keys(CONSTANTS.SIZES).map((key) => CONSTANTS.SIZES[key]),
Copy link
Collaborator

Choose a reason for hiding this comment

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

same here.

@@ -7,7 +7,7 @@ import Element from '../element';
import renderAsShape from '../../modifiers/render-as';

const breakpoints = [null].concat(
Object.keys(CONSTANTS.BREAKPOINTS).map(key => CONSTANTS.BREAKPOINTS[key]),
Object.keys(CONSTANTS.BREAKPOINTS).map((key) => CONSTANTS.BREAKPOINTS[key]),
Copy link
Collaborator

Choose a reason for hiding this comment

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

same here.

@@ -11,7 +11,7 @@ import Element from '../element';
import renderAsShape from '../../modifiers/render-as';

const colors = [null].concat(
Object.keys(CONSTANTS.COLORS).map(key => CONSTANTS.COLORS[key]),
Object.keys(CONSTANTS.COLORS).map((key) => CONSTANTS.COLORS[key]),
Copy link
Collaborator

Choose a reason for hiding this comment

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

same here.

@@ -6,10 +6,10 @@ import CONSTANTS from '../../constants';
import Element from '../element';

const colors = [null].concat(
Object.keys(CONSTANTS.COLORS).map(key => CONSTANTS.COLORS[key]),
Object.keys(CONSTANTS.COLORS).map((key) => CONSTANTS.COLORS[key]),
Copy link
Collaborator

Choose a reason for hiding this comment

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

same here.

@@ -9,7 +9,7 @@ import Element from '../element';
import renderAsShape from '../../modifiers/render-as';

const breakpoints = [null].concat(
Object.keys(CONSTANTS.BREAKPOINTS).map(key => CONSTANTS.BREAKPOINTS[key]),
Object.keys(CONSTANTS.BREAKPOINTS).map((key) => CONSTANTS.BREAKPOINTS[key]),
Copy link
Collaborator

Choose a reason for hiding this comment

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

same here

@@ -10,7 +10,7 @@ import Element from '../element';
import renderAsShape from '../../modifiers/render-as';

const colors = [null].concat(
Object.keys(CONSTANTS.COLORS).map(key => CONSTANTS.COLORS[key]),
Object.keys(CONSTANTS.COLORS).map((key) => CONSTANTS.COLORS[key]),
Copy link
Collaborator

Choose a reason for hiding this comment

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

same here.

@@ -17,7 +17,7 @@ import modifiers from '../../modifiers';
import renderAsShape from '../../modifiers/render-as';

const colors = [null].concat(
Object.keys(CONSTANTS.COLORS).map(key => CONSTANTS.COLORS[key]),
Object.keys(CONSTANTS.COLORS).map((key) => CONSTANTS.COLORS[key]),
Copy link
Collaborator

Choose a reason for hiding this comment

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

same here.

@@ -8,7 +8,7 @@ import Element from '../element';
import renderAsShape from '../../modifiers/render-as';

const colors = [null].concat(
Object.keys(CONSTANTS.COLORS).map(key => CONSTANTS.COLORS[key]),
Object.keys(CONSTANTS.COLORS).map((key) => CONSTANTS.COLORS[key]),
Copy link
Collaborator

Choose a reason for hiding this comment

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

same here.

@@ -6,7 +6,7 @@ import modifiers from '../../modifiers';
import Element from '../element';

const colors = [null].concat(
Object.keys(CONSTANTS.COLORS).map(key => CONSTANTS.COLORS[key]),
Object.keys(CONSTANTS.COLORS).map((key) => CONSTANTS.COLORS[key]),
Copy link
Collaborator

Choose a reason for hiding this comment

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

same here.

@couds
Copy link
Owner Author

couds commented Aug 20, 2020

I changed one of the class component to a functional because I was already there, We can change that little be little later

@kennethnym kennethnym self-requested a review August 23, 2020 15:05
Copy link
Collaborator

@kennethnym kennethnym left a comment

Choose a reason for hiding this comment

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

LGTM! feels so good to have more deletions than additions

@kennethnym kennethnym merged commit 3312c33 into next Aug 23, 2020
@kennethnym kennethnym deleted the remove-sass-for-v4-#262 branch August 23, 2020 15:08
couds added a commit that referenced this pull request Apr 24, 2021
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants