badge-generator
badge-generator copied to clipboard
Extend HTML mode - persist checkbox value and use across views
This PR is an additional feature to issue #101. Created method to store asHtml in store.ts and use that value in Code.vue. If you check/uncheck the Html checkbox in one view, it applies to all other views.
Also a problem I found is that the checkbox only syncs across views - I'd like it to sync within the Catalogue view across checkboxes.
So maybe the asHtml boolean is passed in as a prop to the component. That will make the tests easier. And also then the Catalogue page can have an asHtml value which is passed to all components, so they all share the same value. Events will be needed to sync them.
I tried this global approach but had errors
https://stackoverflow.com/a/54882568/6250733
Also an problem I found is that the checkbox only syncs across views - I'd like it to sync within the Catalogue view across checkboxes.
So maybe the asHtml boolean is passed in as a prop to the component. That will make the tests easier. And also then the Catalogue page can have an asHtml value which is passed to all components, so they all share the same value. Events will be needed to sync them.
I tried this global approach but had errors
https://stackoverflow.com/a/54882568/6250733
Also an problem I found is that the checkbox only syncs across views - I'd like it to sync within the Catalogue view across checkboxes.
So maybe the asHtml boolean is passed in as a prop to the component. That will make the tests easier. And also then the Catalogue page can have an asHtml value which is passed to all components, so they all share the same value. Events will be needed to sync them.
I tried this global approach but had errors
https://stackoverflow.com/a/54882568/6250733
Thanks for noticing those! I will give you a fix as soon as I finish them. And how do I run the test?
https://github.com/MichaelCurrin/badge-generator/blob/master/docs/usage.md#tests
Or on Windows
yarn test
Also note the checks at the bottom of the conversation with green ticks and then a red cross for the failing tests on GitHub Actions
Let me know if you need more info to complete this. Thanks.