changed the default for widgets with new and cumulative tabs#149
changed the default for widgets with new and cumulative tabs#149
Conversation
Signed-off-by: Efren Lim <elim@linuxfoundation.org>
WalkthroughThe changes update the default active tab values and simplify the tabs array in multiple popularity components. Each component now initializes with a new default value (e.g., Changes
Sequence Diagram(s)sequenceDiagram
participant U as User
participant C as Component
participant CP as Computed Property (granularity)
participant API as Data Fetch
U->>C: Load popularity component
C->>C: Initialize with activeTab (new/new-mentions/new-downloads)
C->>CP: Compute granularity based on activeTab
CP->>API: Trigger API call with granularity parameter
API-->>CP: Return data
CP-->>C: Update chart/data rendering
Possibly related PRs
Suggested labels
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (5)
🔇 Additional comments (10)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Pull Request Overview
This PR updates the default view for various widget components to show the "new" data rather than the cumulative values.
- Changes the active tab default value in stars.vue and forks.vue from "cumulative" to "new".
- Updates social-mentions.vue and github-mentions.vue to use "new-mentions" and package-downloads.vue to use "new-downloads" as their default values and adjusts the tab ordering accordingly.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/app/components/modules/project/components/popularity/stars.vue | Changed activeTab default from "cumulative" to "new" and reordered tabs. |
| frontend/app/components/modules/project/components/popularity/social-mentions.vue | Changed activeTab default from "cumulative" to "new-mentions" and reordered tabs. |
| frontend/app/components/modules/project/components/popularity/package-downloads.vue | Changed activeTab default from "cumulative" to "new-downloads" and reordered tabs. |
| frontend/app/components/modules/project/components/popularity/github-mentions.vue | Changed activeTab default from "cumulative" to "new-mentions" and reordered tabs. |
| frontend/app/components/modules/project/components/popularity/forks.vue | Changed activeTab default from "cumulative" to "new" and reordered tabs. |
Comments suppressed due to low confidence (5)
frontend/app/components/modules/project/components/popularity/stars.vue:90
- [nitpick] Verify that the activeTab value 'new' in stars.vue aligns with the naming conventions used in other widgets. If consistency is desired, consider using a widget-specific prefix similar to 'new-mentions' or 'new-downloads'.
const activeTab = ref('new');
frontend/app/components/modules/project/components/popularity/social-mentions.vue:116
- [nitpick] Check that the 'new-mentions' value used in social-mentions.vue is consistent with the naming approach across similar components, ensuring clarity in representing the new view state.
const activeTab = ref('new-mentions');
frontend/app/components/modules/project/components/popularity/package-downloads.vue:87
- [nitpick] Confirm that the activeTab value 'new-downloads' in package-downloads.vue consistently reflects the widget’s context when compared to other related components.
const activeTab = ref('new-downloads');
frontend/app/components/modules/project/components/popularity/github-mentions.vue:94
- [nitpick] Ensure that the activeTab value 'new-mentions' meets the expected naming standard for this widget, especially in relation to similar components like social-mentions.vue.
const activeTab = ref('new-mentions');
frontend/app/components/modules/project/components/popularity/forks.vue:90
- [nitpick] Evaluate if the simple 'new' value for activeTab in forks.vue should be aligned with the widget-specific naming seen in other components, or if its current form is intentional.
const activeTab = ref('new');
In this PR
Changed the default view for widgets that have new and cumulative tabs:
Ticket
INS-354
Summary by CodeRabbit