Skip to content

Improvement/project page mobile#104

Merged
emlimlf merged 3 commits intomainfrom
improvement/project-page-mobile
Mar 13, 2025
Merged

Improvement/project page mobile#104
emlimlf merged 3 commits intomainfrom
improvement/project-page-mobile

Conversation

@emlimlf
Copy link
Copy Markdown
Collaborator

@emlimlf emlimlf commented Mar 13, 2025

In this PR

  • Fix mobile layout for the widgets under the project page
  • Added all the correct widget descriptions (except Active Days which is marked TBD)
  • Linked Learn More to temporary documentation page

Ticket

INS-174

Summary by CodeRabbit

  • New Features

    • Updated descriptive texts across contributor, organization, and development metrics, providing clearer insights.
    • Added “Learn more” links in multiple sections to offer users additional information.
  • Style

    • Enhanced the responsive layout to improve the display and navigation across various screen sizes.

emlimlf added 3 commits March 13, 2025 19:49
Signed-off-by: Efren Lim <elim@linuxfoundation.org>
Signed-off-by: Efren Lim <elim@linuxfoundation.org>
Signed-off-by: Efren Lim <elim@linuxfoundation.org>
@emlimlf emlimlf requested a review from gaspergrom March 13, 2025 12:15
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 13, 2025

Walkthrough

This pull request updates multiple Vue components across contributors, development, popularity, and view sections. The updates mainly revise text descriptions to be more specific to the selected period, replace generic "active contributor" mentions with metric- or activity-specific details, and add new "Learn more" hyperlinks sourced from a newly created links configuration file. Additionally, responsive layout class adjustments have been applied in view components.

Changes

File(s) Change Summary
frontend/.../contributors/active-contributors.vue, active-organizations.vue, contributor-dependency.vue, contributors-leaderboard.vue, geographical-distribution.vue, organization-dependency.vue, organizations-leaderboard.vue, retention.vue Revised descriptive text in paragraphs, introduced "Learn more" anchor links using links.learnMore, and added import of links from configuration.
frontend/.../development/active-days.vue, average-time-to-merge.vue, code-review-engagement.vue, contributions-outside-work-hours.vue, issues-resolution.vue, merge-lead-time.vue, pull-requests.vue, review-time-by-pull-request-size.vue, wait-time-first-review.vue Updated text descriptions to focus on time- and period-specific metrics, replaced generic contributor descriptions with detailed metrics, added "Learn more" hyperlinks, and imported links.
frontend/.../popularity/forks.vue, stars.vue Modified content to describe metrics for forks and stars over the selected period, added "Learn more" hyperlinks, and imported links.
frontend/.../views/contributors.vue, development.vue, popularity.vue Adjusted class attributes for responsive layout behavior without affecting functionality.
frontend/app/config/links.ts Introduced a new constant links with a learnMore URL pointing to the Linux Foundation's documentation.

Possibly related PRs

Tip

⚡🧪 Multi-step agentic review comment chat (experimental)
  • We're introducing multi-step agentic chat in review comments. This experimental feature enhances review discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments.
    - To enable this feature, set early_access to true under in the settings.
✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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.

Actionable comments posted: 0

🔭 Outside diff range comments (1)
frontend/app/components/modules/project/components/development/contributions-outside-work-hours.vue (1)

17-69: 🛠️ Refactor suggestion

Enhance mobile responsiveness for statistics display.

The current layout with multiple flex items and fixed gaps may not adapt well to very small screens. Consider using responsive classes to stack these items vertically on mobile devices.

-      <div class="flex flex-row justify-between items-center mb-6 gap-8">
+      <div class="flex flex-col sm:flex-row justify-between items-center mb-6 gap-4 sm:gap-8">

This change would make the three statistics sections stack vertically on small screens and appear side-by-side on larger screens, improving mobile readability.

🧹 Nitpick comments (6)
frontend/app/components/modules/project/components/development/active-days.vue (1)

7-7: Remember to update the TBD placeholder

The "(TBD)" placeholder aligns with the PR objectives mentioning the Active Days widget description is pending. Consider creating a follow-up task to ensure this gets updated with appropriate content later.

Would you like me to suggest a description that matches the pattern used in other widgets, focusing on the selected time period?

frontend/app/components/modules/project/components/development/code-review-engagement.vue (1)

7-12: Improved description clarity and added learning resources!

The description now accurately specifies "during the selected period" which provides better context. The "Learn more" link is a great addition for users seeking additional information.

Consider adding security attributes to the external link:

<a
  :href="links.learnMore"
  class="text-brand-500"
  target="_blank"
+ rel="noreferrer noopener"
>Learn more</a>
frontend/app/components/modules/project/components/contributors/active-contributors.vue (1)

5-11: Improved clarity in contributor description

The updated description more accurately describes what an active contributor is, and specifies "during the selected time period" which provides better context for users.

Consider adding security attributes to the external link:

<a
  :href="links.learnMore"
  class="text-brand-500"
  target="_blank"
+ rel="noreferrer noopener"
>Learn more</a>
frontend/app/components/modules/project/components/contributors/organization-dependency.vue (1)

5-11: Improved description clarity for organization dependency

The updated description provides a more accurate explanation of what this chart represents, explicitly mentioning the "selected period" for better context.

Consider adding security attributes to the external link:

<a
  :href="links.learnMore"
  class="text-brand-500"
  target="_blank"
+ rel="noreferrer noopener"
>Learn more</a>
frontend/app/components/modules/project/components/contributors/geographical-distribution.vue (2)

19-26: Consider enhancing mobile responsiveness for tabs.

For better mobile experience, consider making the tabs stack vertically on very small screens, as the current implementation with basis-1/2 might be too constrained on mobile devices.

-          <div class="basis-1/2">
+          <div class="basis-full sm:basis-1/2">

27-33: Consider enhancing mobile responsiveness for dropdown.

Similar to the tabs, the dropdown section might benefit from full width on smaller screens.

-          <div class="basis-1/2 flex justify-end">
+          <div class="basis-full sm:basis-1/2 flex justify-end">
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0875920 and 947a599.

📒 Files selected for processing (23)
  • frontend/app/components/modules/project/components/contributors/active-contributors.vue (2 hunks)
  • frontend/app/components/modules/project/components/contributors/active-organizations.vue (2 hunks)
  • frontend/app/components/modules/project/components/contributors/contributor-dependency.vue (2 hunks)
  • frontend/app/components/modules/project/components/contributors/contributors-leaderboard.vue (2 hunks)
  • frontend/app/components/modules/project/components/contributors/geographical-distribution.vue (2 hunks)
  • frontend/app/components/modules/project/components/contributors/organization-dependency.vue (2 hunks)
  • frontend/app/components/modules/project/components/contributors/organizations-leaderboard.vue (2 hunks)
  • frontend/app/components/modules/project/components/contributors/retention.vue (2 hunks)
  • frontend/app/components/modules/project/components/development/active-days.vue (1 hunks)
  • frontend/app/components/modules/project/components/development/average-time-to-merge.vue (2 hunks)
  • frontend/app/components/modules/project/components/development/code-review-engagement.vue (2 hunks)
  • frontend/app/components/modules/project/components/development/contributions-outside-work-hours.vue (2 hunks)
  • frontend/app/components/modules/project/components/development/issues-resolution.vue (2 hunks)
  • frontend/app/components/modules/project/components/development/merge-lead-time.vue (2 hunks)
  • frontend/app/components/modules/project/components/development/pull-requests.vue (2 hunks)
  • frontend/app/components/modules/project/components/development/review-time-by-pull-request-size.vue (2 hunks)
  • frontend/app/components/modules/project/components/development/wait-time-first-review.vue (2 hunks)
  • frontend/app/components/modules/project/components/popularity/forks.vue (2 hunks)
  • frontend/app/components/modules/project/components/popularity/stars.vue (2 hunks)
  • frontend/app/components/modules/project/views/contributors.vue (2 hunks)
  • frontend/app/components/modules/project/views/development.vue (2 hunks)
  • frontend/app/components/modules/project/views/popularity.vue (2 hunks)
  • frontend/app/config/links.ts (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
frontend/app/components/modules/project/components/popularity/forks.vue (1)
Learnt from: gaspergrom
PR: LF-Engineering/insights#22
File: frontend/app/components/modules/project/components/popularity/forks.vue:6-9
Timestamp: 2025-03-13T08:34:30.949Z
Learning: PR #22 focuses on setting up the initial app structure with placeholder content. The descriptions and text content will be updated later when final designs are available.
🔇 Additional comments (41)
frontend/app/config/links.ts (1)

1-3: Good approach for centralizing external links!

Creating a dedicated configuration file for links is a great practice for maintainability. If links need to be updated in the future, they can be changed in one place rather than across multiple components.

frontend/app/components/modules/project/components/popularity/stars.vue (2)

7-12: Clear description with useful "Learn more" link

The updated description clearly explains what the widget displays with specific reference to the time period, matching the PR's objectives for improved mobile descriptions.


84-84: Appropriate import of centralized links configuration

Good practice importing the links object from the centralized configuration file.

frontend/app/components/modules/project/components/development/issues-resolution.vue (2)

7-12: Improved widget description with helpful "Learn more" link

The updated description clearly explains the purpose of the widget with reference to the selected time period, improving user understanding on mobile layouts.


109-109: Appropriate import of centralized links configuration

Good practice importing the links object from the centralized configuration file.

frontend/app/components/modules/project/views/development.vue (1)

4-4: Solid responsive layout implementation!

The responsive class adjustments perfectly address mobile layout requirements. You've implemented:

  • Hiding side navigation on medium screens and smaller
  • Making the content area full-width on large screens and smaller
  • Properly handling the right spacer div visibility

These changes align perfectly with the PR objective to make the projects page mobile responsive.

Also applies to: 11-11, 75-75

frontend/app/components/modules/project/components/development/code-review-engagement.vue (1)

76-76: LGTM - Link import added correctly

The import for the links configuration has been properly added.

frontend/app/components/modules/project/components/contributors/active-contributors.vue (1)

75-75: LGTM - Link import added correctly

The import for the links configuration has been properly added.

frontend/app/components/modules/project/components/contributors/organization-dependency.vue (1)

72-72: LGTM - Link import added correctly

The import for the links configuration has been properly added.

frontend/app/components/modules/project/components/popularity/forks.vue (2)

7-12: Widget description improved with 'Learn more' link.

The description now clearly specifies what the widget shows ("New forks during the selected time period") and adds a helpful "Learn more" link for users to access additional information.


84-84: Import added to support new link feature.

Adding the links import provides access to the centralized link configuration, maintaining consistency across components.

frontend/app/components/modules/project/components/development/wait-time-first-review.vue (2)

7-12: Description updated with clear metric explanation and Learn more link.

The description now precisely explains the metric being displayed (average time between PR submission and first review) and adds a "Learn more" link for users to access additional documentation.


75-75: Required import added for link functionality.

The links import provides access to the centralized link configuration, following the same pattern used in other components.

frontend/app/components/modules/project/components/contributors/organizations-leaderboard.vue (2)

5-11: Organization ranking description improved with Learn more link.

The description now clearly explains how organizations are ranked (based on contributor activities and impact) and provides a link to additional documentation.


46-46: Required import added for Learn more link functionality.

The links import has been added to support the new Learn more link, consistent with implementation in other components.

frontend/app/components/modules/project/components/contributors/contributors-leaderboard.vue (2)

5-10: Contributor ranking description simplified with Learn more link.

The description has been simplified to clearly explain the ranking criteria while adding a Learn more link for users who want additional details.


45-45: Required import added for Learn more link functionality.

The links import provides access to the centralized link configuration, maintaining a consistent approach across components.

frontend/app/components/modules/project/components/development/merge-lead-time.vue (2)

7-12: Improved description with appropriate Learn More link.

The updated description provides a clearer explanation of what the merge lead time metric represents, specifying it's the "Average time taken for pull requests" during the selected period. The addition of the "Learn more" link follows good UX practices by providing users access to more detailed information.


89-89: Good addition of links import.

Properly importing the links configuration from a centralized location follows good practices for maintainability.

frontend/app/components/modules/project/components/development/pull-requests.vue (2)

7-12: Improved description with Learn More link added.

The updated description provides better context about what the chart represents, specifically comparing opened vs. merged/closed pull requests. The "Learn more" link is consistently styled with other components and provides valuable additional information.


115-115: Good addition of links import.

Properly importing the links configuration is consistent with other components in this PR.

frontend/app/components/modules/project/components/contributors/geographical-distribution.vue (2)

6-12: Enhanced description with clear metrics context.

The updated description now more accurately explains what's being displayed, including both contributors and organizations, and explicitly mentions the time period context. The "Learn more" link follows the consistent pattern used across components.


98-98: Good addition of links import.

Properly importing the links configuration from a centralized source is good practice.

frontend/app/components/modules/project/components/development/contributions-outside-work-hours.vue (2)

7-13: Improved description with Learn More link.

The updated description provides clarity about what's being measured (contributions during non-business hours and weekends). The addition of the "Learn more" link follows consistent patterns across components.


109-109: Good addition of links import.

Properly importing the links configuration is consistent with other components.

frontend/app/components/modules/project/components/contributors/active-organizations.vue (2)

5-11: Description update with "Learn more" link looks good.

The updated description is more precise about what constitutes an active organization and adds a helpful "Learn more" link for additional context.


75-75: Import for links is correctly implemented.

The links import is properly added to support the new "Learn more" hyperlink in the template.

frontend/app/components/modules/project/views/popularity.vue (3)

4-4: Good mobile responsiveness implementation.

The max-md:hidden block classes properly hide the side navigation on medium and smaller screens while ensuring it displays as a block element on larger screens.


11-11: Responsive width adjustment is appropriate.

The max-lg:w-full w-1/2 class combination ensures the content takes full width on large screens and below, while maintaining half width on extra large screens.


38-38: Right column is properly hidden on smaller screens.

The max-lg:hidden block classes correctly hide the right column on large screens and below, which helps focus the mobile layout on the main content.

frontend/app/components/modules/project/components/contributors/contributor-dependency.vue (2)

5-11: Description and "Learn more" link addition is well implemented.

The updated description provides better context by specifically mentioning "the selected time period" and adds a helpful "Learn more" link.


72-72: Links import is correctly added.

The import for the links configuration is properly implemented to support the new "Learn more" hyperlink.

frontend/app/components/modules/project/components/development/average-time-to-merge.vue (2)

7-12: Clear description with "Learn more" link is well implemented.

The description now clearly explains what the widget shows and specifies "during the selected period" for better context. The "Learn more" link is a good addition for users seeking additional information.


75-75: Links import is properly added.

The import for the links configuration is correctly implemented to support the new "Learn more" hyperlink in the template.

frontend/app/components/modules/project/views/contributors.vue (3)

4-4: Good responsive design adjustment

The added class max-md:hidden block properly hides the side navigation on medium-sized screens and below, which is essential for mobile layouts where screen real estate is limited.


12-12: Appropriate width adjustment for mobile responsiveness

The max-lg:w-full class allows the content area to take full width on large screens and below, which maximizes the available space for widget display on mobile devices.


73-73: Effective space optimization

Hiding the empty spacing div on large screens and below with max-lg:hidden block helps optimize the layout for mobile displays, allowing more room for the actual content.

frontend/app/components/modules/project/components/development/review-time-by-pull-request-size.vue (2)

7-12: Clear description and helpful resource link

The updated description text now accurately specifies that it shows average review time for pull requests during the selected period. The added "Learn more" link provides users with access to additional information, enhancing the educational value of the widget.


60-60: Required import for the new feature

This import brings in the links configuration, which is necessary for the "Learn more" link functionality added to the component.

frontend/app/components/modules/project/components/contributors/retention.vue (2)

5-10: Improved clarity and added resource link

The description now clearly explains that the retention rate covers both contributors and organizations during the selected period. The "Learn more" link provides users with access to additional resources, enhancing the educational value of the widget.


68-68: Required import for the new feature

This import brings in the links configuration, which is necessary for the "Learn more" link functionality added to the component.

@emlimlf emlimlf merged commit f4f7f53 into main Mar 13, 2025
3 checks passed
@emlimlf emlimlf deleted the improvement/project-page-mobile branch March 13, 2025 14:23
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