-
Notifications
You must be signed in to change notification settings - Fork 657
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
Enable Style Customization #659
base: master
Are you sure you want to change the base?
Conversation
Move styling out of components to scss - This will allow styling overrides to be specified using classes and css. Using composeEvents() was creating a new function reference being passed to the itemRenderer.
@SharpSeeEr I am glad you found what you need from the library. Thank you for this. I will look into the PR and review it but the compose event is there for a reason... It is needed for you to be able to pass event handlers to the item that we already use like mouseup, mousedown... you can provide memoize function for the compose and it will solve your problem. |
I did see the purpose of I am a veteran developer, but a junior react developer - feedback is always welcome. I also read the contributing guidelines today (one day too late) and see that pull requests should go to master. I would be more than happy to close this PR and reopen a new one to master if needed. |
@SharpSeeEr develop branch is okay no worries.
You handled the first case but not the second. I would suggest just memorizing the function |
Thanks! I'll look into the memoization and update the pull request... soonish. I appreciate this early feedback just as much! |
any updates on that? I think it's nice to have |
Issue Number
#415
Overview of PR
I just recently discovered this library, and it is the perfect fit for my project. I did find it strange that the only way to custom style the component was using an itemRenderer, groupRenderer, and passing specific styles. Since it is a component library meant to be used in any project styling should be the simplest thing to override and customize, IMO.
So I have moved all styles that can be safely overridden from jsx to scss. Overriding the default styling is now as simple as overriding the css classes.
I also removed the use of composeEvents() in items.js, as it caused creation of new functions to pass as props to itemRenderer on every render. I know, I know, multiple changes in one PR! Horrible. But it seemed to give a decent performance increase. I have absolutely zero hard facts to back that claim up.
I'm using the timeline with several thousand groups with anywhere from 3 to 20 items per group, so performance is very important to me, and performance is a little slow right now.