Skip to content

Fix/module name overlap #1556

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

Merged
merged 4 commits into from
Apr 24, 2025

Conversation

arifulhoque7
Copy link
Contributor

@arifulhoque7 arifulhoque7 commented Apr 23, 2025

close #1555

Fix: Adjust plugin card text alignment

  • Increased the margin-left for the .name and .desc > p elements within .plugin-card components to 148px.
  • This adjustment ensures proper alignment of the plugin name and description text, likely preventing overlap with the plugin icon or thumbnail and improving the overall layout readability in the plugin listing sections.

Screenshot:
image

Summary by CodeRabbit

  • Style

    • Improved alignment and spacing for upgrade buttons and icons in the admin interface.
    • Enhanced layout of plugin card descriptions and names for better readability.
  • Chores

    • Updated GitHub Actions workflow to use the latest method for setting output variables, ensuring compatibility with current standards.

@arifulhoque7 arifulhoque7 requested a review from sapayth April 23, 2025 09:29
Copy link

coderabbitai bot commented Apr 23, 2025

Walkthrough

This update modifies CSS and LESS files to improve the alignment and spacing of module names and icons in the modules section, ensuring that module names are no longer obscured by icons. It introduces flexbox properties to relevant button and icon classes and adjusts margins for plugin card text. Additionally, the GitHub Actions workflow is updated to replace deprecated output syntax with the recommended method for setting output variables.

Changes

Files/Paths Change Summary
assets/css/admin.css, assets/less/admin.less Enhanced button and icon alignment using flexbox, introduced .pro-icon class, adjusted SVG and text margins.
.github/workflows/phpcs.yml Updated output variable syntax to use $GITHUB_OUTPUT instead of deprecated set-output command.

Assessment against linked issues

Objective (Issue #) Addressed Explanation
Fix module names being obscured by icons in modules section (#1555)

Suggested labels

QA Approved, Ready to Merge

Suggested reviewers

  • sapayth

Poem

A bunny hopped through fields of code,
Adjusted margins, lightened the load.
Flex and align, the icons now shine,
Module names clear—oh, how divine!
With workflows refreshed and styles anew,
This patch brings clarity, just for you.
🐇✨


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
🪧 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 generate sequence diagram to generate a sequence diagram of the changes in 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.

@arifulhoque7 arifulhoque7 self-assigned this Apr 23, 2025
Copy link

@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: 1

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 74ab233 and 6c309c0.

📒 Files selected for processing (3)
  • .github/workflows/phpcs.yml (2 hunks)
  • assets/css/admin.css (3 hunks)
  • assets/less/admin.less (3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: test
🔇 Additional comments (8)
.github/workflows/phpcs.yml (1)

20-20: Use new output file syntax for Composer cache directory
The command correctly replaces the deprecated ::set-output syntax by appending dir=... to $GITHUB_OUTPUT.

assets/css/admin.css (3)

688-697: Enhance upgrade button alignment with inline-flex
Adding display: inline-flex, align-items: center, gap, and white-space: nowrap will correctly align the icon and text in the “Upgrade to Pro” button.


710-713: Vertically center the Pro icon wrapper
Using an inline-flex container for .pro-icon with align-items: center ensures consistent vertical alignment of the SVG icon.


1354-1356: Offset plugin card text to prevent overlap
The added rule correctly applies a left margin (148px !important) to plugin card name and description to avoid overlapping the icon.

assets/less/admin.less (4)

896-901: Mirror inline-flex upgrade button styles in LESS
These declarations in LESS align with the CSS changes, ensuring the “Upgrade to Pro” button uses inline-flex and proper spacing.


917-920: Center-align Pro icon container in LESS
Good to introduce an inline-flex wrapper for .pro-icon, aligning icons horizontally and vertically.


922-925: Add left margin to SVG icons in LESS
Adding margin-left: 5px will space the SVG away from preceding text, matching the CSS behavior.


1234-1236: Indent plugin card name and description in LESS
Replicating the margin-left: 148px !important ensures consistency across your compiled CSS and LESS outputs.

Comment on lines 33 to 37
run: |
URL="https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files"
FILES=$(curl -s -X GET -G $URL | jq -r '.[] | .filename' | xargs)
echo "::set-output name=files::$FILES"
echo "files=$FILES" >> $GITHUB_OUTPUT

Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

⚠️ Potential issue

Filter changed files to PHP before running PHPCS
You’re now collecting all changed filenames, but passing CSS/LESS (and other non-PHP) files into phpcs will cause it to error. Filter the list to only PHP files.

Apply this diff:

 run: |
   URL="https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files"
-  FILES=$(curl -s -X GET -G $URL | jq -r '.[] | .filename' | xargs)
+  FILES=$(curl -s -X GET -G $URL \
+    | jq -r '.[] | .filename' \
+    | grep -E '\.php$' \
+    | xargs)
   echo "files=$FILES" >> $GITHUB_OUTPUT
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
run: |
URL="https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files"
FILES=$(curl -s -X GET -G $URL | jq -r '.[] | .filename' | xargs)
echo "::set-output name=files::$FILES"
echo "files=$FILES" >> $GITHUB_OUTPUT
run: |
URL="https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files"
FILES=$(curl -s -X GET -G $URL \
| jq -r '.[] | .filename' \
| grep -E '\.php$' \
| xargs)
echo "files=$FILES" >> $GITHUB_OUTPUT

Copy link
Member

@sapayth sapayth 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

@Rubaiyat-E-Mohammad Rubaiyat-E-Mohammad added QA In Progress QA Approved This PR is approved by the QA team Ready to Merge This PR is now ready to be merged and removed needs: testing QA In Progress labels Apr 24, 2025
@sapayth sapayth merged commit 6fe85d5 into weDevsOfficial:develop Apr 24, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
QA Approved This PR is approved by the QA team Ready to Merge This PR is now ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Module names in Modules Section are behind the icons
3 participants