Skip to content

create new universal js config file to include into the skill wheel t…#659

Open
Sahil590 wants to merge 5 commits intomainfrom
595-js-snippet
Open

create new universal js config file to include into the skill wheel t…#659
Sahil590 wants to merge 5 commits intomainfrom
595-js-snippet

Conversation

@Sahil590
Copy link
Copy Markdown
Contributor

@Sahil590 Sahil590 commented Mar 27, 2026

Description

I removed the common bits of JS code and moved them to a JS file in the static folder and Included it in the skill profile page, roles and index page (hero.html)

Fixes #595

Type of change

  • Documentation (non-breaking change that adds or improves the documentation)
  • New feature (non-breaking change which adds functionality)
  • Optimization (non-breaking, back-end change that speeds up the code)
  • Technical work (non-breaking, change which is work as part of a new feature)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (whatever its nature)

Key checklist

  • All tests pass (eg. python -m pytest)
  • The documentation builds and looks OK (eg. mkdocs serve)
  • Pre-commit hooks run successfully (eg. pre-commit run --all-files)

Further checks

  • Code is commented, particularly in hard-to-understand areas
  • Tests added or an issue has been opened to tackle that in the future. (Indicate issue here: # (issue))

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR centralizes the Radial Bar Chart (“Skills Wheel”) configuration and render helper into a shared static JS file, then updates templates to use that shared function rather than repeating the config inline.

Changes:

  • Added main/static/main/js/radial-bar-chart-config.js to hold radialBarChartConfig and renderRadialBarChart(...).
  • Updated three templates to load the shared JS and call renderRadialBarChart(...) instead of duplicating the config object.
  • Reduced inline JS duplication across the Skills Wheel pages/snippets.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

File Description
main/templates/main/user_skill_profile.html Loads shared chart config JS and switches to renderRadialBarChart(...).
main/templates/main/snippets/hero.html Loads shared chart config JS and reuses renderRadialBarChart(...) for the homepage hero wheel.
main/templates/main/pages/roles.html Loads shared chart config JS and reuses renderRadialBarChart(...) to render all sample role wheels.
main/static/main/js/radial-bar-chart-config.js New shared chart configuration + render helper.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sahil Raja and others added 3 commits March 27, 2026 12:08
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this is the right place for this. The static files are assets that are built by NPM, so I'm not sure if there is meant to be anything directly committed to here.

No profiles
{% endif %}
</section>
<script defer src="{% static 'js/radial-bar-chart-config.js' %}"></script>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was imagining that we'd be able to remove the <script> element entirely and put it in a html template snippet that we could pass values to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make snippet for the skill wheel visualisation

3 participants