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: correctly convert words from map to array #569

Merged
merged 1 commit into from
May 9, 2024
Merged

fix: correctly convert words from map to array #569

merged 1 commit into from
May 9, 2024

Conversation

BelKed
Copy link
Contributor

@BelKed BelKed commented May 9, 2024

Manually tested, works :)



🚀 This description was created by Ellipsis for commit ae09570

Summary:

Fixes the conversion of words from Map to array in CategoryBuilder.vue to ensure correct UI functionality.

Key points:

  • Updated words_by_duration in CategoryBuilder.vue to correctly convert Map to array using spread operator.
  • Ensures correct functionality for sorting and filtering words by duration in UI.

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 ae09570 in 34 seconds

More details
  • Looked at 16 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. src/views/settings/CategoryBuilder.vue:156
  • Draft comment:
    The change from treating words as an object to treating it as a Map is consistent with the usage in the fetchWords method where words is defined as a Map. This update ensures that the methods used for conversion and manipulation are appropriate for a Map data structure.
  • Reason this comment was not posted::
    Confidence changes required: 0%
    The PR changes the way words are converted from a Map to an array. The original code seems to have treated words as an object, but the new code treats it as a Map. This change is crucial because the methods used (Object.values vs. Map.prototype.values) are specific to the data structure type. The PR author has changed the type of words from an object to a Map in the fetchWords method (line 242). This change is consistent throughout the code, and the new method of conversion using [...this.words.values()] is correct for a Map. The PR description and linked issues do not provide specific details about why this change was necessary, but it seems to be a correction to align with the actual data structure used in the codebase.

Workflow ID: wflow_CB1N3IUTvCHpWMg1


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

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

Copy link

codecov bot commented May 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 25.60%. Comparing base (d3a22c2) to head (ae09570).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #569   +/-   ##
=======================================
  Coverage   25.60%   25.60%           
=======================================
  Files          27       27           
  Lines        1613     1613           
  Branches      273      273           
=======================================
  Hits          413      413           
  Misses       1174     1174           
  Partials       26       26           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ErikBjare ErikBjare merged commit 5993db3 into ActivityWatch:master May 9, 2024
8 checks passed
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.

2 participants