Implement a shareable url of a skills profile that can be viewed when not logged in#746
Implement a shareable url of a skills profile that can be viewed when not logged in#746sbland wants to merge 3 commits into
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
@AdrianDAlessandro if you get chance this one is ready for review. Thanks! |
AdrianDAlessandro
left a comment
There was a problem hiding this comment.
This looks good and behaves as expected!
I've left some comments on some changes I'd like to see, but have approved so I don't delay it further.
| <button class="export-skill-profile-link btn btn-secondary mt-4">Generate shareable link</button> | ||
| {% include "main/snippets/create_user_skill_profile_link.html" %} |
There was a problem hiding this comment.
I think I would prefer if this button just opens the link in a new tab, instead of copying it to the clipboard. Then, if someone want to copy the link, they can just right-click > copy url or copy the url from the new tab.
| except json.JSONDecodeError: | ||
| logger.error("Invalid JSON in query parameters") | ||
| context["chart_data"] = [] | ||
| context["skill_levels"] = [] |
There was a problem hiding this comment.
I think in this case we should show a warning message on the page, or even just make it a 400 error.
| return reverse("licensing") | ||
|
|
||
|
|
||
| class TestViewSkillProfilePageView(TemplateOkMixin): |
There was a problem hiding this comment.
It'd be good to include a test_provides_required_context method on this. There are a few example of these already in the files. Let me know if you have an issues with providing the query parameters to the test client
There was a problem hiding this comment.
I also tried to include a beautiful soup test to match the one on TestUserSkillProfile but adding query parameters to the _get_url method is a bit tricky when it's used in a fixture. I'll take another look later.
0273649 to
a603f00
Compare
Description
This implements a "Get shareable link" button next to the export as csv button on a users skill wheel page.
Following the url takes you to a publicly accessible anonymous view of the exported skill wheel data.
Screenshot of public view:

It needs the following before being merged:
Part of #742 (issue)
Type of change
Key checklist
python -m pytest)mkdocs serve)pre-commit run --all-files)Further checks