kolibri icon indicating copy to clipboard operation
kolibri copied to clipboard

removed gridLayoutOverrides for KCardGrid

Open shruti862 opened this issue 8 months ago • 5 comments

Summary

Removed gridLayout overrides for KCardGrid to now use updated default grid gap which is set to 24px.

References

Addresses issue #996 of KDS Referenced PR #999 in KDS

Reviewer guidance

Summary by CodeRabbit

  • Refactor
    • Simplified the layout configuration for resource card grids, removing dynamic layout overrides and standardizing to a consistent grid layout. No visible changes to functionality or appearance are expected for end-users.

shruti862 avatar Apr 19 '25 08:04 shruti862

Walkthrough

The changes remove the gridLayoutOverrides computed property and its usage as a prop on KCardGrid components in two Vue files. Both components previously passed a dynamic layout override to KCardGrid to control grid behavior; this override and its related logic have been eliminated. Now, KCardGrid is used with a static layout="1-1-1" attribute, and no other component logic or structure is modified.

Changes

File(s) Change Summary
kolibri/plugins/coach/assets/src/views/common/resourceSelection/ContentCardList.vue Removed gridLayoutOverrides computed property and its usage as the layoutOverride prop on KCardGrid. Now uses only layout="1-1-1".
kolibri/plugins/coach/assets/src/views/common/resourceSelection/subPages/SelectionIndex.vue Removed gridLayoutOverrides computed property and its usage as the layoutOverride prop on KCardGrid. Now uses only layout="1-1-1".

Sequence Diagram(s)

No sequence diagram is generated because the changes are limited to prop and computed property removal without affecting control flow or component interactions.


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 2cc19044b36d478bc962a48245c6bd07775ecba1 and e43d3724f96486b400172776546ec4905f6f9c05.

📒 Files selected for processing (2)
  • kolibri/plugins/coach/assets/src/views/common/resourceSelection/ContentCardList.vue (1 hunks)
  • kolibri/plugins/coach/assets/src/views/common/resourceSelection/subPages/SelectionIndex.vue (2 hunks)
🔇 Additional comments (3)
kolibri/plugins/coach/assets/src/views/common/resourceSelection/ContentCardList.vue (1)

12-12: Layout simplification looks good.

The removal of the custom gridLayoutOverrides computed property in favor of the static layout="1-1-1" attribute aligns with the PR objective to use the updated default grid gap (24px) from KDS. This change simplifies the component and promotes consistency with the design system standards.

kolibri/plugins/coach/assets/src/views/common/resourceSelection/subPages/SelectionIndex.vue (2)

49-49: Layout simplification looks good.

The removal of the custom gridLayoutOverrides computed property in favor of the static layout="1-1-1" attribute aligns with the PR objective to use the updated default grid gap (24px) from KDS. This change simplifies the component and promotes consistency with the design system standards.


92-92: Layout simplification looks good.

The removal of the custom gridLayoutOverrides computed property in favor of the static layout="1-1-1" attribute aligns with the PR objective to use the updated default grid gap (24px) from KDS. This change is correctly and consistently applied to all instances of KCardGrid in this file.


🪧 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.

coderabbitai[bot] avatar Apr 24 '25 06:04 coderabbitai[bot]

@AllanOXDi @nucleogenesis While it'd be good to review this together with the KDS PR, just leaving a note here that it needs to be merged after a new version of KDS including KDS#999 is released.

MisRob avatar Apr 24 '25 06:04 MisRob

The change that this PR is waiting for is already released on KDS @nucleogenesis @AllanOXDi. Can you review this part?

MisRob avatar Jun 16 '25 02:06 MisRob

Hi @shruti862 I did scan through. could you address the conflicts so that can have a final look

AllanOXDi avatar Jun 17 '25 11:06 AllanOXDi

@shruti862 - would you be able to resolve the conflict here? I'll give it a full review and test things out once that's done

nucleogenesis avatar Jul 17 '25 20:07 nucleogenesis

@shruti862 - would you be able to resolve the conflict here? I'll give it a full review and test things out once that's done

Sorry for the delayed response! Yes, I've resolved the merge conflict. Let me know if there's anything else you'd like me to update.

shruti862 avatar Jul 28 '25 05:07 shruti862

I was trying to resolve the linting errors and I don't know how my others commit went into this branch while rebasing. So, closing this one.

New PR link :https://github.com/learningequality/kolibri/pull/13597

shruti862 avatar Jul 28 '25 09:07 shruti862