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

repurposing component index code for charts index #1746

Merged
merged 31 commits into from
Oct 8, 2020
Merged

Conversation

shinytoyrobots
Copy link
Contributor

Addressing #1647

At this point primarily duplicated the community component index into a "Charts" component, and relevant GraphQL schema.

Very much WIP.

Need to refine from a code / functionality perspective.

Need design feedback on possible changes to layout for a chart index vs a component index.

@vercel
Copy link

vercel bot commented Sep 16, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/carbon-design-system/carbondesignsystem/3gi1lx3gg
✅ Preview: https://carbondesignsystem-git-dataviz-index.carbon-design-system.vercel.app

@shinytoyrobots
Copy link
Contributor Author

If it builds this time (!), also interested in a sanity check from @joshblack / @andreancardona. At this point it really is primarily a near-complete duplicate of all the component index code and schema.

I think that should work as a foundation for any other type of index (as we'll end up doing likewise for patterns at some point)...although also feels like maybe longer term there's a better way than just rebuilding three different indices with three different (but basically identical) schemas. :D

@joshblack
Copy link
Contributor

Definitely could try and repurpose the index plugin too to work for both types, would be great if we could do:

{
  resolve: 'gatsby-plugin-index',
  options: {
    sources: [
      {
        name: 'community',
        directory: '...',
      },
      {
        name: 'charts',
        directory: '...',
      },
    ],
  },
}

And it would just work. In the future might even make sense for this data just to be coming from an API and editable through a UI (which could be do-able with our service that we're doing right now since we'll have component data there)

@shinytoyrobots
Copy link
Contributor Author

That makes sense.

Presumably then we could just add all the chart .yml files in the interim, even if they're initially being referenced by chart-index, and then change to reference them from a combined index in future (i.e. we add the data first).

This is, I think, definitely the correct approach. Because then we'll end up with (as a final result)...

{
  resolve: 'gatsby-plugin-index',
  options: {
    sources: [
      {
        name: 'components',
        directory: '...',
      },
      {
        name: 'charts',
        directory: '...',
      },
      {
        name: 'patterns',
        directory: '...',
      },
    ],
  },
}

...where we can present the different types on different pages (so a "component index", "chart index" etc), but also in theory a single, filterable, "catalog of everything".

@shinytoyrobots
Copy link
Contributor Author

@andreancardona / @joshblack - this works ok, but it breaks completely if you filter to a point of "no results". Do you have any thoughts?

@vercel vercel bot temporarily deployed to Preview September 24, 2020 19:49 Inactive
@joshblack
Copy link
Contributor

@shinytoyrobots took a quick look, I think the fix is that suggestion above 👀 let me know if it works!

@shinytoyrobots
Copy link
Contributor Author

Now that this has some population with data - I think it's important that we get some design feedback. @aagonzales, I'll set up a brief chat with you, @aledavila and I about any considerations we should take into account. Let me know if there's anyone else I need to add to that meeting.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 8, 2020

Images automagically compressed by Calibre's image-actions

Compression reduced images by 24.1%, saving 80.39 KB.

Filename Before After Improvement Visual comparison
src/data/chart-index/carbon-charts/images/alluvial.png 8.06 KB 5.80 KB -28.1% View diff
src/data/chart-index/carbon-charts/images/area.png 9.62 KB 7.25 KB -24.6% View diff
src/data/chart-index/carbon-charts/images/donut.png 7.36 KB 4.65 KB -36.9% View diff
src/data/chart-index/carbon-charts/images/gauge.png 5.71 KB 3.28 KB -42.7% View diff
src/data/chart-index/carbon-charts/images/geospatial.png 14.48 KB 10.58 KB -27.0% View diff
src/data/chart-index/carbon-charts/images/heatmap.png 4.90 KB 3.42 KB -30.1% View diff
src/data/chart-index/carbon-charts/images/line.png 6.01 KB 3.41 KB -43.3% View diff
src/data/chart-index/carbon-charts/images/meter.png 4.26 KB 2.30 KB -46.0% View diff
src/data/chart-index/carbon-charts/images/network-diagrams.png 6.02 KB 3.49 KB -42.1% View diff
src/data/chart-index/carbon-charts/images/parallel-coordinates.png 13.96 KB 9.61 KB -31.1% View diff
src/data/chart-index/carbon-charts/images/pie.png 7.06 KB 4.76 KB -32.6% View diff
src/data/chart-index/carbon-charts/images/scatter.png 8.09 KB 5.28 KB -34.7% View diff
src/data/chart-index/carbon-charts/images/tree-maps.png 2.62 KB 1.21 KB -53.7% View diff
src/pages/homepage/images/2020_dataviz.png 117.43 KB 93.80 KB -20.1% View diff
src/pages/whats-happening/news-and-articles/images/2020_dataviz.png 117.43 KB 93.80 KB -20.1% View diff

1127 images did not require optimisation.

@mjabbink
Copy link
Contributor

mjabbink commented Oct 8, 2020

Looking at the AI Apps charts I think these need to probably not be included in the index. Only 5–6 new ones and they are incredibly weak with no guidance, specs, or refined designs, Sketch files zero. Just a static image with missing details and misleading.

We have current design efforts on following charts:

Bullet
KPI
Network Diagram
Histogram
Alluvial
Lollipop

@kodiakhq
Copy link
Contributor

kodiakhq bot commented Oct 8, 2020

This PR currently has a merge conflict. Please resolve this and then re-add the status: ready to merge 🎉 label.

@shinytoyrobots
Copy link
Contributor Author

Part of the point of the index is to highlight duplicates though - to provide a greater impetus to consolidate and refine. So would we be better keeping the AI Apps charts in (for a soft launch at least) and using that as a basis to reach out to Craig to discuss effective next steps?

@alisonjoseph
Copy link
Member

Is there a reason we are duplicating the code from the component index and not reusing the same component for both? Would we want to just have one component for both so its easier to update in the future and keep them in sync?

@github-actions
Copy link
Contributor

github-actions bot commented Oct 8, 2020

Images automagically compressed by Calibre's image-actions

Compression reduced images by 20.1%, saving 47.27 KB.

Filename Before After Improvement Visual comparison
src/pages/homepage/images/2020_dataviz.png 117.43 KB 93.80 KB -20.1% View diff
src/pages/whats-happening/news-and-articles/images/2020_dataviz.png 117.43 KB 93.80 KB -20.1% View diff

1140 images did not require optimisation.

@aledavila
Copy link
Contributor

@alisonjoseph so that will actually be a next step. To repurpose the component plug-in to allow for us to reuse it and be able to add the charts and patterns.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 8, 2020

Images automagically compressed by Calibre's image-actions

Compression reduced images by 5.7%, saving 20.73 KB.

Filename Before After Improvement Visual comparison
src/pages/all-about-carbon/images/team/abbink_mike.png 153.59 KB 148.06 KB -3.6% View diff
src/pages/all-about-carbon/images/team/seabrook_billy.png 209.83 KB 194.63 KB -7.2% View diff

1141 images did not require optimisation.

@kodiakhq kodiakhq bot merged commit e528f72 into master Oct 8, 2020
@kodiakhq kodiakhq bot deleted the dataviz-index branch October 8, 2020 17:10
@vpicone
Copy link
Contributor

vpicone commented Oct 9, 2020

@shinytoyrobots you can't have two properties on an object with the same name. This PR broke all the component index images.

Screen Shot 2020-10-08 at 9 51 21 PM

Screen Shot 2020-10-08 at 9 53 17 PM

@shinytoyrobots
Copy link
Contributor Author

Thanks for the spot. And a good reminder that just testing the thing being built can mean missing knock-on effects (from clumsy coding on my part).

natashadecoste pushed a commit to natashadecoste/carbon-website that referenced this pull request May 19, 2021
…em#1746)

* repurposing component index code for charts index

* dummy data causing build prob?

* dummy data

* does it build with parameter absent, not incorrect

* tweaks made during our call

* added ai-apps basic charts

* feat(chart-index): add carbon charts files to index

* chore(chart-index): fix duplicate titles

* updated filters and test thumbnails

* Optimised images with calibre/image-actions

* added 'Other' as a valid option for chart type

* added a 'complexity' filter

* Optimised images with calibre/image-actions

* Added advanced charts from carbon and ai-apps

* images for all carbon-charts, fix capitalization

* cleanup and page title change

* remove cognos as maintainer until they have content

* add contribution note to no result text

* fix misspelt chart name

* Optimised images with calibre/image-actions

* resolve image conflict

* Optimised images with calibre/image-actions

* Optimised images with calibre/image-actions

Co-authored-by: Alessandra Davila <aledavila@ibm.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
natashadecoste pushed a commit to natashadecoste/carbon-website that referenced this pull request May 19, 2021
…em#1746)

* repurposing component index code for charts index

* dummy data causing build prob?

* dummy data

* does it build with parameter absent, not incorrect

* tweaks made during our call

* added ai-apps basic charts

* feat(chart-index): add carbon charts files to index

* chore(chart-index): fix duplicate titles

* updated filters and test thumbnails

* Optimised images with calibre/image-actions

* added 'Other' as a valid option for chart type

* added a 'complexity' filter

* Optimised images with calibre/image-actions

* Added advanced charts from carbon and ai-apps

* images for all carbon-charts, fix capitalization

* cleanup and page title change

* remove cognos as maintainer until they have content

* add contribution note to no result text

* fix misspelt chart name

* Optimised images with calibre/image-actions

* resolve image conflict

* Optimised images with calibre/image-actions

* Optimised images with calibre/image-actions

Co-authored-by: Alessandra Davila <aledavila@ibm.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants