-
Notifications
You must be signed in to change notification settings - Fork 121
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
feat(a11y): add textures to fill options #1138
Conversation
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
Hi @nickofthyme @markov00, |
@ron-debajyoti sorry for the delayed review. I'll take a look at this today. @markov00 is out sick today but should be back tomorrow to review as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fantastic! Thanks, again for your work on this. Also much less complex than I expected it to be.
I left a few comments that came to mind I think we could expose some options on the Theme
that would allow the user to better control the pattern as well as provide a small subset of simple patterns to choose from as you mentioned in the TODO's.
Hi @nickofthyme! I started implementing the API, based on the feed you gave earlier and so far I have considered this interface for
and updated the I'm a bit confused about how are we going to start filling the textures automatically. For a start, I was thinking of looking into this line for xy_charts, but I'm confused about how do we automate the selection of texture. Is there a way to maybe add the texture data to every Meanwhile, should I open a new PR with the latest updated code, since the current PR is just a draft one for discussion ? |
Hi @ron-debajyoti thanks for all your help here! If you like to open a new PR with an updated code is fine. |
Yeah, that would be great as well. |
Hey @nickofthyme @markov00, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @ron-debajyoti I've wrote some comments on the PR that should help you complete the work.
In particular how to get the texture from the style object of the geometry and the request to apply the pattern also to bars
Thanks a lot for that huge work
- use shared svg shape paths - pull texture styles from theme - add more options to texture theme styles - add global pattern rotation and offset - add stories to showcase changes - dry up degree to radian conversions
- Add texture option to rect styles - improves shared geom highlight opacity usage - set default rectBorder.strokeWidth to 1, visible will hide - improve stories with bar series option
@ron-debajyoti I made a few changes to the great start you provided, I hope you don't mind me pushing to your branch 😅. I think this is for the most part complete in terms of the overall implementation, @markov00 let me know if I'm missing something. I wired up the I also added two stories to play with the textures in our storybook. To see them you can just run...
Then visit either and play with the knob inputs:
I think the only thing remaining is to fix the unit and visual regression tests. I can look at those tomorrow unless you'd like to take a stab at it. Anyways, lmk if you have any questions or comments on the changes. I'd be happy to explain. |
Hey @nickofthyme @markov00 , On another note, do you think is it a good idea for me to take up some of the other open beginner level issues of this project despite not being a core member of elastic? I got a good overall feel of the codebase and would love to improve my skills esp. writing modular code. |
Jenkins test this please |
Jenkins test this please |
@markov00 both stories seem to work fine with bars for me. Let me know if you see something different. Screen.Recording.2021-06-07.at.11.43.26.AM.mp4 |
@ron-debajyoti If you'd like to take on another issue I compiled a list of potentially good issues to tackle under the |
Jenkins retest this please |
Jenkins test this please |
# [30.1.0](v30.0.0...v30.1.0) (2021-06-08) ### Features * **a11y:** add textures to fill options ([#1138](#1138)) ([fd0479f](fd0479f))
🎉 This PR is included in version 30.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
# [30.1.0](elastic/elastic-charts@v30.0.0...v30.1.0) (2021-06-08) ### Features * **a11y:** add textures to fill options ([opensearch-project#1138](elastic/elastic-charts#1138)) ([6e03cd9](elastic/elastic-charts@6e03cd9))
Summary
Adds optional
texture
styles prop toRectStyle
andAreaStyle
for xy area and bar charts.Screen.Recording.2021-05-27.at.04.25.06.PM.mp4
Details
Adds new
TextureStyle
interface below.Limitations
Unable to be assigned across
splitSeriesAccesors
likecolor
, thus limited to separateSeries
definitions. Could be improved in the future to make___SeriesStyle
applied perXYSeriesIdentifier
.Connected issues
fix #1061 - Adds textures styles for xy area and bar charts
Todos:
xy_chart/renderer/canvas/primitives/path.ts
. We need to modularize it so that it can be added to different charts.Checklist
src/index.ts
(and stories only import from../src
except for test data & storybook)