-
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
Webworker Analytics #736
Webworker Analytics #736
Conversation
d41c21f
to
bacf56d
Compare
5c054b2
to
ed3ea71
Compare
8ac0bbb
to
5224492
Compare
return cardName; | ||
} else if (section.startsWith('[[')) { | ||
const cardIndex = parseInt(section.substring(2, section.length - 2), 10); | ||
const card = cube.cards[cardIndex]; |
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 requires this component to be passed a cube object. Can we revise this such that it either: makes an API call to the server asking for the card object that matches the name, or the autocard to a new route on the server that redirects to the correct image.
Then we can use in a lot of other places too, without having to pass through this object.
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.
You don't need to change it for this PR, on second thought. I'll create a separate issue for this
Add filters to analysis Add markdown formatting for analytics. Update colorCount analytics.
Handle when there are no draft formats for a cube.
Run Prettier on the analytics changes. Remove the tests for old system. Need to add new tests. Remove obsolete files.
Fix type breakdown when some colors have no cards.
Refactor Chart Visualizations to work with arbitrary chart types. Refactor and add row headers to tables.
Revert package-lock.json changes. Remove unused setutils
5224492
to
cc194eb
Compare
cc194eb
to
1184bcb
Compare
I put together a rough proof of concept of one way to do user customizable analytics for #19. You can test it out at https://cubecobra.ruler501.com/cube/analysis/packwars. It supports tables and bar charts currently.
The UI could use a decent amount of work. I'm relatively poor at designing and writing UI so have been focused mostly on getting the functionality working.
The overarching idea is to have analytics be run on the client side over the set of cards in the cube through WebWorkers which provide isolation from the page environment. These scripts would receive messages with the cards and respond with descriptions of the visualization they want for their analytic. I planned to allow responses to render tables, line graphs, bar graphs, pie charts, word clouds and card image with associated text grids(like the token analytic now).
This also introduces a markdown lke language that supports rendering percentages, mana symbols, card images, and card links with autocard.
Further work intended is to add the other visualization supports mentioned, port over all existing analytic functions, add tests, and make the script requirements and how to write more discoverable.
Custom analytics has been dropped from scope for now due to security concerns.
Changes and Features:
Potential Future Work: