Skip to content
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

Communication: Fix padding issues in channel search and post components #9927

Conversation

PaRangger
Copy link
Contributor

@PaRangger PaRangger commented Dec 2, 2024

Checklist

General

Client

  • I strictly followed the client coding and design guidelines.
  • Following the theming guidelines, I specified colors only in the theming variable files and checked that the changes look consistent in both the light and the dark theme.
  • I added multiple screenshots/screencasts of my UI changes.

Motivation and Context

Currently, there are some padding issues when searching for announcement posts. This makes the search result look buggy:
390392304-e2ae9c08-6eea-4a4b-aa26-7aebe9e88511

This was accompanied by another issue that consecutive announcements that were saved did not color the title accordingly:
Bildschirmfoto 2024-12-02 um 09 47 35

Lastly, also the channel internal search had some missing padding, making it look out-of-line with the other components:
image

Description

I added some padding to the search component and removed the padding at the announcement channel title and added the coloring to the background if saved.

Steps for Testing

Prerequisites:

  • 1 User
  • 1 Course with communication enabled
  1. Log into Artemis
  2. Go to course
  3. Go to the communication tab
  4. Open a channel
  5. Click on the channel-search button
  6. Check if the search input is aligned with the other components
  7. Search for a keyword within a announcement
  8. Check if the channel title in the result is aligned with the message

Testserver States

Note

These badges show the state of the test servers.
Green = Currently available, Red = Currently locked
Click on the badges to get to the test servers.







Review Progress

Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2

Screenshots

Announcement Title:
Bildschirmfoto 2024-12-02 um 09 57 49
Search input:
Bildschirmfoto 2024-12-02 um 09 58 57

Summary by CodeRabbit

  • New Features

    • Enhanced layout for the conversation messages and post components, improving user experience.
    • Introduced a new class for styling context information in posts.
  • Bug Fixes

    • Adjusted padding and layout for the search bar section to ensure better visibility and usability.
  • Documentation

    • Improved HTML structure for better readability and maintainability without altering functionality.

@PaRangger PaRangger added client Pull requests that update TypeScript code. (Added Automatically!) small bugfix component:Communication communication Pull requests that affect the corresponding module labels Dec 2, 2024
@PaRangger PaRangger self-assigned this Dec 2, 2024
@github-actions github-actions bot removed the communication Pull requests that affect the corresponding module label Dec 2, 2024
@PaRangger PaRangger temporarily deployed to artemis-test1.artemis.cit.tum.de December 2, 2024 09:08 — with GitHub Actions Inactive
@PaRangger PaRangger marked this pull request as ready for review December 2, 2024 09:15
@PaRangger PaRangger requested a review from a team as a code owner December 2, 2024 09:15
Copy link

coderabbitai bot commented Dec 2, 2024

Walkthrough

The pull request includes modifications to the HTML structure and styling of the conversation-messages.component.html and post.component.html files, focusing on layout adjustments and class bindings. The changes enhance the visual presentation of the components without altering their underlying logic or functionality. New class definitions were introduced in the corresponding SCSS file to support these adjustments, ensuring improved readability and maintainability of the code.

Changes

File Path Change Summary
src/main/webapp/app/overview/course-conversations/layout/conversation-messages/conversation-messages.component.html Modified HTML structure and class attributes for layout adjustments in the conversation messages component.
src/main/webapp/app/shared/metis/post/post.component.html Adjusted HTML structure and class bindings to improve styling and readability in the post component.
src/main/webapp/app/shared/metis/post/post.component.scss Introduced a new class .post-context-information-wrap to the styles without altering existing properties.

Possibly related PRs

Suggested labels

user interface, ready to merge

Suggested reviewers

  • florian-glombik
  • JohannesStoehr
  • rabeatwork
  • az108
  • krusche
  • HawKhiem

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between dece904 and 8c50f3a.

📒 Files selected for processing (3)
  • src/main/webapp/app/overview/course-conversations/layout/conversation-messages/conversation-messages.component.html (1 hunks)
  • src/main/webapp/app/shared/metis/post/post.component.html (2 hunks)
  • src/main/webapp/app/shared/metis/post/post.component.scss (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • src/main/webapp/app/shared/metis/post/post.component.scss
🧰 Additional context used
📓 Path-based instructions (2)
src/main/webapp/app/shared/metis/post/post.component.html (1)

Pattern src/main/webapp/**/*.html: @if and @for are new and valid Angular syntax replacing *ngIf and *ngFor. They should always be used over the old style.

src/main/webapp/app/overview/course-conversations/layout/conversation-messages/conversation-messages.component.html (1)

Pattern src/main/webapp/**/*.html: @if and @for are new and valid Angular syntax replacing *ngIf and *ngFor. They should always be used over the old style.

🔇 Additional comments (5)
src/main/webapp/app/overview/course-conversations/layout/conversation-messages/conversation-messages.component.html (1)

4-4: LGTM! Padding adjustment improves layout consistency

The change from p-0 to px-3 py-0 adds horizontal padding while maintaining zero vertical padding, which aligns with the PR's objective to fix padding issues in the search component.

src/main/webapp/app/shared/metis/post/post.component.html (4)

24-25: LGTM! Improved structure with dedicated wrapper class

The introduction of post-context-information-wrap class provides better organization and maintainability for styling post context information.


30-30: LGTM! Refined announcement icon spacing

The padding adjustment pe-0 ms-1 ensures consistent spacing around the announcement icon.


37-40: LGTM! Consistent margin application

The margin classes (ms-1) are consistently applied across different context information elements, maintaining uniform spacing.

Also applies to: 49-49


55-57: LGTM! Simplified post title structure

The span structure for post titles has been simplified while maintaining proper spacing with ms-1.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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 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 or @coderabbitai title anywhere in the PR title to generate the title automatically.

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

@ahbitaqu ahbitaqu left a comment

Choose a reason for hiding this comment

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

[Tested on TS2]
Works as described for me!

Search padding is there
image

Announcement is aligned as well:
image

Copy link
Contributor

@asliayk asliayk left a comment

Choose a reason for hiding this comment

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

tested locally, works as described

Copy link

@HawKhiem HawKhiem left a comment

Choose a reason for hiding this comment

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

Tested on TS2. Works as described

image

Copy link

@Haoyuli2002 Haoyuli2002 left a comment

Choose a reason for hiding this comment

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

Tested on TS2, I could successfully see that the channel title in the result is aligned with the message. This feature couuld really help students to better navigate through different messages to the correct chanel and I think this feature is working well :D.
Screenshot 2024-12-02 at 12 31 17
Screenshot 2024-12-02 at 12 31 32

Copy link

@SimonKaran13 SimonKaran13 left a comment

Choose a reason for hiding this comment

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

I tested on TS2 and it works as expected. The channel name and the icon are correctly aligned with the message. I also tried resizing the window and it worked fine as well.
image

@krusche krusche added this to the 7.7.4 milestone Dec 2, 2024
@krusche krusche merged commit 0bfacf8 into develop Dec 2, 2024
120 of 122 checks passed
@krusche krusche deleted the bugfix/communication/padding-issues-search-and-channel-title branch December 2, 2024 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix client Pull requests that update TypeScript code. (Added Automatically!) component:Communication ready to merge small
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

8 participants