Fixed problem with copying participants data to a CSV#2680
Fixed problem with copying participants data to a CSV#2680JWPCode wants to merge 1 commit intoTabbycatDebate:developfrom
Conversation
… to be included when the table data is copied to the clipboard.
| cells = [{ | ||
| 'icon': 'check' if datum else '', | ||
| 'sort': 1 if datum else 2, | ||
| 'text': '✔️' if datum else '', |
There was a problem hiding this comment.
I think embedding emojis in CSVs may cause problems when pasting into Excel, and using an emoji makes the table look weird as inconsistent with other symbols we use.
I would recommend modifying tables/SmartTable.vue instead for how the data is copied. There, we could make it so that the "check" icon gives back a "TRUE" value.
There was a problem hiding this comment.
Coming back to this Your 100% right. However I'm not sure my environment is setup properly for some reason. Python code changes would happen perfectly, but none of my changes to SmartTable.vue have an effect, even going so far as to (Temporarily) delete the CSV export code, and the output would outputted CSV would not change .
There was a problem hiding this comment.
Sorry to hear that! After modifying Vue code, you might have to run a few commands to bundle the JS:
npm run build && dj collectstatic
If the LOCAL_DEVELOPMENT env var is set, npm run serve should be able to auto-reload JS (on refresh).
I believe I found the problem, the Boolean data was handled with a different function witch would create an icon that would not be recognised by the function to copy data to the clipboard. Changing this icon to a text emoji fixed this. To my knowledge and testing the emojis work with the CSV file format.
This is my first Pull request, if there are steps I have missed or any other issues I will be happy to fix them up.
Fixes #2664