Skip to content

Conversation

jbadan
Copy link
Contributor

@jbadan jbadan commented Mar 3, 2020

Description

  • Fonts are no longer included in each component, follow instruction in readme to include fonts in your own project.
  • New peer dependency on @sap-theming/theming-base-content
  • Counter
    • moved from Badge folder to Counter folder - import as import { Counter } from 'fundamental-react/Counter'
  • Badge, Label
    • removed, use new InfoLabel component
  • ActionBar
    • Removed ActionBar.Back, ActionBar.Header, ActionBar.Actions component, now built into ActionBar via props
  • Button
    • option=‘light’ to option=‘transparent’

@jbadan jbadan changed the title feat: remove fonts from package, feat: remove fonts from package, update ActionBar, Button and InfoLabel Mar 3, 2020
<style type="text/css">
@font-face {
font-family: '72';
src: url('./72-Regular.woff') format('woff');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is stupid and annoying, but I couldn't get the fonts from @sap-theming to load from node_modules in here 😢

@netlify
Copy link

netlify bot commented Mar 3, 2020

Deploy preview for fundamental-react ready!

Built with commit 508f3a3

https://deploy-preview-908--fundamental-react.netlify.com

fs.copyFile('README.md', 'src/_playground/documentation/Home/README.md', (err) => {
if (err) throw err;
});

Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved to scripts/copy-assets.js

@jbadan jbadan requested a review from a team March 3, 2020 02:09
buttonContainerClassNames: 'Classnames to spread to the back Button container.',
description: 'Localized text for the description.',
descriptionProps: 'Additional props to be spread to the description\'s `<p>` element.',
headingLevel: 'Heading level. `<h1>` is reserved for the page title.',
Copy link
Contributor

Choose a reason for hiding this comment

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

if h1 is reserved, should the propType be CustomPropTypes.range(2, 6), then?

actionClassNames: 'Classnames to spread to the action Button container.',
actionProps: 'Props to spread to the action Button container',
actions: 'Button components to add to the ActionBar.',
buttonContainerClassNames: 'Classnames to spread to the back Button container.',
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems weird to have actionClassNames and buttonContainerClassNames plural when we use className which isn't plural for the same idea.

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like there is a mixture of both ways of doing it in fundamental-react

actionClassNames
buttonContainerClassNames
labelClassNames
inputClassNames
listClassNames
tokenizerClassNames

vs

backdropClassName
contentClassName
inputClassName
popperClassName
tableBodyClassName
table....ClassName
referenceClassName

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think that came from a bunch of different people implementing it. We should do a separate story to clean it up in one go.

I'll make this one singular for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now that I look at the history on it.... it's only me that's been adding the plural ones 😆🤣

description: 'Localized text for the description.',
descriptionProps: 'Additional props to be spread to the description\'s `<p>` element.',
headingLevel: 'Heading level. `<h1>` is reserved for the page title.',
onClick: 'Callback to pass to the back Button container.'
Copy link
Contributor

Choose a reason for hiding this comment

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

isn't it passed to the button and not its container?

Copy link
Contributor

Choose a reason for hiding this comment

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

There is no subcomponent anymore. That said, should we name this prop something to reflect that it's for the back button (e.g. onBackClick)?

Copy link
Contributor

@skvale skvale left a comment

Choose a reason for hiding this comment

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

LGTM

package.json Outdated
"start:playground": "npm run storybook",
"std-version": "standard-version -m \"chore(release): version %s build ${TRAVIS_BUILD_NUMBER} [ci skip]\"",
"storybook": "start-storybook -p 12123",
"storybook": "node scripts/copy-assets.js && start-storybook -p 12123 -s src/_playground/fonts",
Copy link
Contributor

Choose a reason for hiding this comment

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

Would we want to make the static directory more generic and then just include a fonts directory within it?

description: 'Localized text for the description.',
descriptionProps: 'Additional props to be spread to the description\'s `<p>` element.',
headingLevel: 'Heading level. `<h1>` is reserved for the page title.',
onClick: 'Callback to pass to the back Button container.'
Copy link
Contributor

Choose a reason for hiding this comment

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

There is no subcomponent anymore. That said, should we name this prop something to reflect that it's for the back button (e.g. onBackClick)?

Copy link
Contributor

@greg-a-smith greg-a-smith left a comment

Choose a reason for hiding this comment

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

Looks good. 🚢

@jbadan jbadan merged commit e3e6c9a into master Mar 4, 2020
@jbadan jbadan deleted the feat/remove-fonts branch March 4, 2020 17:27
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.

4 participants