Skip to content

fix(ui): contributions list style#593

Merged
NagariaHussain merged 1 commit intodevelopfrom
fix/contributions-page-perf
Mar 31, 2026
Merged

fix(ui): contributions list style#593
NagariaHussain merged 1 commit intodevelopfrom
fix/contributions-page-perf

Conversation

@NagariaHussain
Copy link
Copy Markdown
Collaborator

@NagariaHussain NagariaHussain commented Mar 31, 2026

No description provided.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 31, 2026

Walkthrough

The Contributions.vue component was modified to adjust layout behavior and reduce DOM nesting. The page container now includes overflow-hidden styling, and the header row was configured with shrink-0 to prevent expansion. Tab panel rendering was simplified by replacing wrapper <div> elements with <template> conditionals using v-if and v-else-if, eliminating extra DOM nodes. The main content areas for "My Change Requests" and "Pending Reviews" sections transitioned from fixed viewport-height classes to flex-based sizing (flex-1) while retaining overflow-auto for scrollability, altering how scrollable regions are calculated within the flex container.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title 'fix(ui): contributions list style' refers to UI styling changes, but the main objectives involve performance optimization through API refactoring, pagination, and layout fixes—not primarily style adjustments. Update the title to reflect the primary change: 'fix(perf): optimize contributions page with pagination and list resource' or similar, to accurately represent the performance and architectural improvements.
✅ Passed checks (2 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
frontend/src/pages/Contributions.vue (2)

123-130: ⚠️ Potential issue | 🟠 Major

Missing wiki_space field causes broken navigation for Draft/Changes Requested rows.

The getRowRoute function (line 170) references row.wiki_space to build the SpaceDetails route, but only wiki_space.space_name is fetched—which returns as space_name, not the link field value itself. This will pass undefined as the spaceId param.

🐛 Proposed fix: add wiki_space to fields
 const myChangeRequests = createListResource({
 	doctype: 'Wiki Change Request',
-	fields: ['name', 'title', 'wiki_space.space_name', 'status', 'modified', 'archived_at', 'merged_at'],
+	fields: ['name', 'title', 'wiki_space', 'wiki_space.space_name', 'status', 'modified', 'archived_at', 'merged_at'],
 	filters: { owner: ['=', userStore.user] },
 	orderBy: 'modified desc',
 	pageLength: 25,
 	auto: true,
 });
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@frontend/src/pages/Contributions.vue` around lines 123 - 130, The list
resource myChangeRequests is only fetching nested wiki_space.space_name so
row.wiki_space is undefined in getRowRoute; update the createListResource call
for myChangeRequests to include the link field "wiki_space" (in addition to
"wiki_space.space_name") so getRowRoute can read row.wiki_space and build the
SpaceDetails route correctly.

132-139: ⚠️ Potential issue | 🟠 Major

Fix auto property to use a plain boolean instead of a ComputedRef.

The auto property in createListResource expects a plain boolean value, but computed(() => isManager.value) passes a ComputedRef object. This causes the resource to always auto-fetch (since the object is truthy) regardless of whether isManager.value changes, breaking the intended conditional fetch behavior.

Use auto: isManager.value to pass the plain boolean directly.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@frontend/src/pages/Contributions.vue` around lines 132 - 139, The
pendingReviews resource passes a ComputedRef to createListResource via auto:
computed(() => isManager.value), which results in truthy object behavior; change
the auto property to a plain boolean by using isManager.value directly (i.e.,
set auto to isManager.value) so createListResource receives a boolean and will
only auto-fetch when the manager flag is true.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@frontend/src/pages/Contributions.vue`:
- Around line 123-130: The list resource myChangeRequests is only fetching
nested wiki_space.space_name so row.wiki_space is undefined in getRowRoute;
update the createListResource call for myChangeRequests to include the link
field "wiki_space" (in addition to "wiki_space.space_name") so getRowRoute can
read row.wiki_space and build the SpaceDetails route correctly.
- Around line 132-139: The pendingReviews resource passes a ComputedRef to
createListResource via auto: computed(() => isManager.value), which results in
truthy object behavior; change the auto property to a plain boolean by using
isManager.value directly (i.e., set auto to isManager.value) so
createListResource receives a boolean and will only auto-fetch when the manager
flag is true.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 45c887ab-021f-4f45-aa72-a44cc2b3c216

📥 Commits

Reviewing files that changed from the base of the PR and between dee03cf and 437bc4d.

📒 Files selected for processing (1)
  • frontend/src/pages/Contributions.vue

@NagariaHussain NagariaHussain changed the title fix: optimize contributions page performance fix(ui): contributions list style Mar 31, 2026
@NagariaHussain NagariaHussain merged commit 4999822 into develop Mar 31, 2026
4 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.

1 participant