Skip to content
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

fix: Correct encoding in category filter links on summary view #566

Conversation

pkvach
Copy link
Contributor

@pkvach pkvach commented May 8, 2024

Fixes ActivityWatch/activitywatch#1051

This change ensures category names in the summary view URLs are web-compatible by encoding them with encodeURIComponent.


🚀 This description was created by Ellipsis for commit 91e418f

Summary:

Updated the linkfunc in aw-summary for 'top_categories' to encode category names using encodeURIComponent for URL compatibility in /src/components/SelectableVisualization.vue.

Key points:

  • Updated linkfunc in aw-summary for 'top_categories' in /src/components/SelectableVisualization.vue.
  • Encoded category names using encodeURIComponent for URL compatibility.

Generated with ❤️ by ellipsis.dev

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Reviewed everything up to 91e418f in 19 seconds

More details
  • Looked at 14 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 additional comments because they didn't meet confidence threshold of 50%.
1. /src/components/SelectableVisualization.vue:67:
  • Assessed confidence : 0%
  • Comment:
    The use of encodeURIComponent for encoding URL parameters is appropriate and correctly implemented here. This ensures that special characters in category names do not break the URL structure.
  • Reasoning:
    The PR aims to fix an issue with encoding category names in URLs. The change uses encodeURIComponent to encode the category names, which is a standard method for encoding URI components to ensure special characters are correctly represented in URLs. This is a common practice to prevent issues such as spaces and other special characters breaking the URL format. The change is made in the linkfunc which constructs the URL for category filter links. This seems appropriate and correctly implemented based on the PR description and the issue it addresses.

Workflow ID: wflow_Ca9BbnHR95t4i0tO


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

12 days left in your free trial, upgrade for $20/seat/month or contact us.

@ErikBjare
Copy link
Member

Very good! Thanks ❤️

@ErikBjare ErikBjare merged commit d3a22c2 into ActivityWatch:master May 8, 2024
8 checks passed
@pkvach pkvach deleted the dev/fix-category-filter-links-encoding branch May 8, 2024 09:22
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.

Invalid encoding for category filter links from summary view
2 participants