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

Update chatbox design and add send icon SVG file #461

Merged
merged 23 commits into from
Sep 9, 2024

Conversation

freedompraise
Copy link
Collaborator

@freedompraise freedompraise commented Aug 21, 2024

This pull request includes several commits that update the design of the chatbox and add a new send icon SVG file.

The commits also fix the position of the "TOP" button (for scrolling up) to the left side to avoid the open chatbox display over it, as the chatbox is now at the right; following the more conventional styling

It adjusts the position and CSS styles of the chatbox header and footer. Additionally, the commits refactor the chatbox UI to improve the user experience by increasing the height of the chatbox and ensuring that the textarea resizes properly, closing #455

Summary by CodeRabbit

  • New Features

    • Introduced a close button for easier dismissal of the chatbox.
    • Added predefined messages for enhanced initial user engagement.
    • Implemented dynamic textarea height adjustment for improved usability.
  • Enhancements

    • Updated chatbox design with a modern background and improved button styles for better interactivity.
    • Enhanced visual hierarchy and organization of chatbox components, including refined typography and message timestamps.
    • Added a footer section crediting "Blogthedata" for improved branding.
  • Bug Fixes

    • Improved textarea functionality to prevent overflow and ensure consistent height adjustments.

freedompraise and others added 14 commits June 24, 2024 07:08
This commit improves the resizing behavior of the chatbox textarea. Previously, the textarea would resize vertically as the user typed, but it would not reset to its original height after sending a message. This commit fixes that issue by resetting the height of the textarea to "auto" after sending a message.

Co-authored-by: John Solly <[email protected]>
This commit increases the height of the chatbox in the main.css file to improve the user experience. The chatbox height was increased from 500px to 550px to provide more space for messages. This change ensures that users have enough room to view and interact with the chatbox comfortably.

Co-authored-by: John Solly <[email protected]>
Copy link

coderabbitai bot commented Aug 21, 2024

Walkthrough

The recent updates enhance the chatbox component by modifying its structure and functionality. Key changes include a new header with a simplified title and timestamp, predefined messages for immediate context, and an added close button for user convenience. CSS styles have been refined for improved aesthetics, while JavaScript functionalities have been updated to enable dynamic adjustments and better user interactions.

Changes

Files Change Summary
app/blog/templates/.../chatbox.html, app/staticfiles/css/..., app/staticfiles/js/... Significant updates to the chatbox, including a restructured header, improved message layout, refined CSS styling, and enhanced JavaScript for user interaction with features like a close button and dynamic textarea adjustments.

Poem

🐇 In a chatbox bright, with a title so clear,
New features arise, spreading joy and cheer.
With a close button near, and messages that flow,
Together we chat, watch our friendships grow!
Hopping through changes, we dance in delight,
Here’s to new moments, under soft moonlight! 🌙✨


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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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 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

@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

Commits

Files that changed from the base of the PR and between ea4b72e and caa8730.

Files ignored due to path filters (2)
  • app/staticfiles/svg/close-icon.svg is excluded by !**/*.svg
  • app/staticfiles/svg/send-icon.svg is excluded by !**/*.svg
Files selected for processing (3)
  • app/blog/templates/blog/parts/chatbox.html (1 hunks)
  • app/staticfiles/css/main.css (22 hunks)
  • app/staticfiles/js/chatbox.js (3 hunks)
Additional context used
Biome
app/staticfiles/css/main.css

[error] 869-869: Expected a selector but instead found ')'.

Expected a selector here.

(parse)

Additional comments not posted (13)
app/staticfiles/js/chatbox.js (5)

7-9: LGTM! Initialization of DOM elements is correct.

The constructor correctly initializes the new close button along with other elements.


15-38: LGTM! Event listeners and MutationObserver are well-implemented.

The display method effectively manages user interactions and dynamic UI adjustments.


44-46: LGTM! Chatbox state toggling is correctly handled.

The toggleState method efficiently manages the visibility of the chatbox and its icon.


56-58: LGTM! Message sending and textarea reset are correctly implemented.

The onSendButton method efficiently sends messages and resets the textarea.


Line range hint 62-66: LGTM! Chatbox message update is correctly handled.

The updateChatText method efficiently adds new messages to the chatbox.

app/blog/templates/blog/parts/chatbox.html (4)

10-17: LGTM! Chatbox header is well-structured and accessible.

The header includes a clear title, timestamp, and an accessible close button.


19-22: LGTM! Initial bot messages enhance user engagement.

The predefined messages provide context and improve the initial interaction.


27-42: LGTM! Chatbox footer is well-structured and functional.

The footer includes a clear input area and branding, enhancing user interaction.


45-47: LGTM! Chatbox toggle button is correctly positioned and accessible.

The button is well-placed and includes an accessible label.

app/staticfiles/css/main.css (4)

47-51: LGTM! Gradient variables are well-defined.

The new CSS variables provide flexibility for styling.


948-954: LGTM! Chatbox styling enhances usability and aesthetics.

The increased dimensions and gradients improve the overall appearance.


1077-1090: LGTM! Message item styling is effective.

The styles enhance readability and provide interactive feedback on hover.


1097-1106: LGTM! Footer styling is well-executed.

The gradients and padding enhance the footer's appearance and usability.

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

Commits

Files that changed from the base of the PR and between caa8730 and 99babe4.

Files selected for processing (1)
  • app/staticfiles/css/main.css (22 hunks)
Additional context used
Biome
app/staticfiles/css/main.css

[error] 869-869: Expected a selector but instead found ')'.

Expected a selector here.

(parse)

Additional comments not posted (5)
app/staticfiles/css/main.css (5)

47-51: LGTM! Gradient definition is correct.

The secondary gradient is defined correctly and enhances the visual design.


783-783: LGTM! Code styling is consistent.

The styling for inline code elements is appropriate and consistent with typical practices.


924-928: LGTM! Chatbox icon styling is appropriate.

The styling for the chatbox icon is clear and suitable for a clickable element.


948-954: LGTM! Chatbox support styling enhances usability.

The increased height and styling changes align well with the PR objectives to improve usability.


1013-1017: LGTM! Chatbox support styling is consistent with redesign.

The modifications enhance the visual appeal and are consistent with the overall chatbox redesign.

@freedompraise
Copy link
Collaborator Author

@jsolly awaiting your review

@jsolly
Copy link
Owner

jsolly commented Aug 27, 2024

Looking pretty good @freedompraise

Here are some thoughts:
CleanShot 2024-08-26 at 20 31 53

You might want to take a look at the formatting of the blog post title + date for blog post cards for inspiration
CleanShot 2024-08-26 at 20 36 50

Instead of having a button background color on hover, consider adjusting the icon's color. For example, if the user hovers over the 'x' or the send message button, the SVG can change color instead of the whole background changing color.

When you hover over the social icons on my website, I do something similar. But instead of changing the color, I adjust the opacity and size.

CleanShot 2024-08-26 at 20 40 20

See https://johnsolly.dev/about/

<button aria-label="Toggle chatbox"><img id="chatbox-icon" src="{% static 'svg/chatbox-icon.svg' %}"
alt="Chatbox icon" /></button>
<button aria-label="Toggle chatbox">
<img id="chatbox-icon" src="{% static 'svg/chatbox-icon.svg' %}" alt="Chatbox icon" />
Copy link
Owner

Choose a reason for hiding this comment

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

If you end up changing the icon color on hover, you might need to embed the svg directly in the HTML instead of using the img tag.

Copy link
Owner

@jsolly jsolly left a comment

Choose a reason for hiding this comment

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

See above comment for changes.

If I recall correctly, it is not possible to change an SVG color if it is inside /static and referenced via static in an img tag.

You might need to put the SVGs directly in the HTML in order to manipulate them dynamically.

@freedompraise
Copy link
Collaborator Author

See above comment for changes.

If I recall correctly, it is not possible to change an SVG color if it is inside /static and referenced via static in an img tag.

You might need to put the SVGs directly in the HTML in order to manipulate them dynamically.

Alright, noted

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: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 99babe4 and ba33216.

Files selected for processing (2)
  • app/blog/templates/blog/parts/chatbox.html (1 hunks)
  • app/staticfiles/css/main.css (23 hunks)
Additional context used
Biome
app/staticfiles/css/main.css

[error] 869-869: Expected a selector but instead found ')'.

Expected a selector here.

(parse)

Additional comments not posted (10)
app/blog/templates/blog/parts/chatbox.html (5)

10-17: LGTM!

The header section updates improve the user interface by making it more informative and interactive.

The code changes are approved.


19-22: LGTM!

The message display area updates make the chatbox more engaging by providing immediate context to the user.

The code changes are approved.


27-37: LGTM!

The footer section updates improve the user experience by making the chatbox more user-friendly and visually appealing.

The code changes are approved.


40-42: LGTM!

The new footer section enhances the branding and informational aspect of the chatbox.

The code changes are approved.


45-47: LGTM!

The chatbox button update improves the visual appeal of the chatbox.

The code changes are approved.

app/staticfiles/css/main.css (5)

47-51: LGTM!

The new CSS variables for gradients improve the visual appeal of the chatbox.

The code changes are approved.


933-941: LGTM!

The chatbot container updates improve the usability and aesthetics of the chatbox.

The code changes are approved.


948-954: LGTM!

The chatbox support section updates improve the visual appeal and functionality of the chatbox.

The code changes are approved.


1023-1031: LGTM!

The chatbox header updates improve the visual appeal and functionality of the chatbox.

The code changes are approved.


1099-1104: LGTM!

The chatbox footer updates improve the visual appeal and functionality of the chatbox.

The code changes are approved.

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: 4

Outside diff range, codebase verification and nitpick comments (1)
app/staticfiles/css/main.css (1)

954-968: Review chatbox styling for usability and aesthetics.

The chatbox styling includes a fixed position, dimensions, and shadow effects, which are well-suited for a floating interface element. However, consider the following enhancements for better user experience:

  • Accessibility: Ensure that the contrast ratios meet WCAG guidelines, especially for text and background colors.
  • Responsiveness: Verify that the chatbox dimensions and position adjust well on mobile devices or provide alternative layouts for smaller screens.
Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between ba33216 and ea7bbd0.

Files selected for processing (2)
  • app/blog/templates/blog/parts/chatbox.html (1 hunks)
  • app/staticfiles/css/main.css (23 hunks)
Files skipped from review as they are similar to previous changes (1)
  • app/blog/templates/blog/parts/chatbox.html
Additional context used
Biome
app/staticfiles/css/main.css

[error] 869-869: Expected a selector but instead found ')'.

Expected a selector here.

(parse)

Additional comments not posted (2)
app/staticfiles/css/main.css (2)

1625-1631: Ensure animations are appropriate for reduced motion preferences.

The CSS rules within the media query for prefers-reduced-motion: reduce correctly disable animations for users who prefer reduced motion. This is an excellent practice for accessibility. Ensure that all potentially motion-inducing effects are covered by this setting.


926-937: Refine SVG icon hover effects in chatbox.

The hover effects for SVG icons in the chatbox are defined to change the fill color to white. This is a good use of CSS for visual feedback. However, ensure that the !important rule is necessary, as it can make future CSS maintenance more challenging.

Verification successful

Unique use of !important with SVG fill properties

The use of !important with SVG fill properties in the chatbox CSS appears to be unique within the codebase. This suggests that the rule is not consistently applied elsewhere, which may simplify future CSS maintenance. Consider whether the !important rule is necessary in this context.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for other instances where `!important` is used with SVG fill properties to ensure consistency.

# Test: Search for SVG fill properties using `!important`. Expect: Consistent usage or none.
rg --type css 'svg.*fill:.*!important'

Length of output: 40


Script:

#!/bin/bash
# Description: Re-check for instances where `!important` is used with SVG fill properties in CSS files.

# Test: Search for any usage of `!important` with SVG fill properties, using a broader pattern.
rg --type css 'fill:.*!important.*svg'

Length of output: 40

/* =============
Typography
============= */

p>code {
p > code {
Copy link

Choose a reason for hiding this comment

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

Enhance readability of inline code elements.

The styling for p > code uses a specific color which might not be sufficiently contrasted against some backgrounds. Consider adjusting the color or adding a background to enhance readability.

- p > code {
-   color: #e76f51;
-   font-family: monospace;
-   font-size: 0.95em;
- }
+ p > code {
+   color: #e76f51; /* Consider a darker shade for better contrast */
+   background-color: #f4f4f4; /* Adding a light background for better visibility */
+   font-family: monospace;
+   font-size: 0.95em;
+   padding: 2px 4px; /* Adding padding for better text separation */
+ }

Committable suggestion was skipped due to low confidence.

Comment on lines +47 to +51
--secondary-gradient: linear-gradient(
268.91deg,
#0d6efd -2.14%,
#007bff 99.69%
);
Copy link

Choose a reason for hiding this comment

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

Refactor gradient definitions for consistency.

The gradient definitions for --secondary-gradient are split across multiple lines, which might affect readability. Consider consolidating these into a single line for consistency with other CSS properties.

- --secondary-gradient: linear-gradient(
-   268.91deg,
-   #0d6efd -2.14%,
-   #007bff 99.69%
- );
+ --secondary-gradient: linear-gradient(268.91deg, #0d6efd -2.14%, #007bff 99.69%);
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
--secondary-gradient: linear-gradient(
268.91deg,
#0d6efd -2.14%,
#007bff 99.69%
);
--secondary-gradient: linear-gradient(268.91deg, #0d6efd -2.14%, #007bff 99.69%);

Comment on lines 1093 to 1106
.messages__item::after {
content: attr(data-time);
position: absolute;
bottom: -20px;
right: 10px;
font-size: 0.75rem;
color: #888;
opacity: 0;
transition: opacity 0.3s;
}

.messages__item:hover::after {
opacity: 1;
}
Copy link

Choose a reason for hiding this comment

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

Improve message timestamp visibility.

The CSS for showing timestamps on hover (messages__item::after) is a clever feature. However, the opacity transition might be too subtle. Consider making the timestamp slightly more visible even when not hovered to aid in user orientation and context.

- .messages__item::after {
-   opacity: 0;
-   transition: opacity 0.3s;
- }
+ .messages__item::after {
+   opacity: 0.3; /* Slightly visible by default */
+   transition: opacity 0.3s;
+ }
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
.messages__item::after {
content: attr(data-time);
position: absolute;
bottom: -20px;
right: 10px;
font-size: 0.75rem;
color: #888;
opacity: 0;
transition: opacity 0.3s;
}
.messages__item:hover::after {
opacity: 1;
}
.messages__item::after {
content: attr(data-time);
position: absolute;
bottom: -20px;
right: 10px;
font-size: 0.75rem;
color: #888;
opacity: 0.3; /* Slightly visible by default */
transition: opacity 0.3s;
}
.messages__item:hover::after {
opacity: 1;
}

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: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between ea7bbd0 and 57d5f1a.

Files selected for processing (2)
  • app/blog/templates/blog/parts/chatbox.html (1 hunks)
  • app/staticfiles/css/main.css (23 hunks)
Files skipped from review as they are similar to previous changes (1)
  • app/blog/templates/blog/parts/chatbox.html
Additional context used
Biome
app/staticfiles/css/main.css

[error] 869-869: Expected a selector but instead found ')'.

Expected a selector here.

(parse)

Additional comments not posted (8)
app/staticfiles/css/main.css (8)

783-783: Enhance readability of inline code elements.

The styling for p > code uses a specific color which might not be sufficiently contrasted against some backgrounds. Consider adjusting the color or adding a background to enhance readability.

- p > code {
-   color: #e76f51;
-   font-family: monospace;
-   font-size: 0.95em;
- }
+ p > code {
+   color: #e76f51; /* Consider a darker shade for better contrast */
+   background-color: #f4f4f4; /* Adding a light background for better visibility */
+   font-family: monospace;
+   font-size: 0.95em;
+   padding: 2px 4px; /* Adding padding for better text separation */
+ }

848-869: Correct syntax error in CSS selector.

There's a syntax error due to an unmatched closing parenthesis in the :is selector. This issue was previously flagged but not corrected. Ensure to fix the selector as follows:

- :is(
+ :is(
Tools
Biome

[error] 869-869: Expected a selector but instead found ')'.

Expected a selector here.

(parse)


47-51: Refactor gradient definitions for consistency.

The gradient definitions for --secondary-gradient are split across multiple lines, which might affect readability. Consider consolidating these into a single line for consistency with other CSS properties.

- --secondary-gradient: linear-gradient(
-   268.91deg,
-   #0d6efd -2.14%,
-   #007bff 99.69%
- );
+ --secondary-gradient: linear-gradient(268.91deg, #0d6efd -2.14%, #007bff 99.69%);

1093-1106: Improve message timestamp visibility.

The CSS for showing timestamps on hover (messages__item::after) is a clever feature. However, the opacity transition might be too subtle. Consider making the timestamp slightly more visible even when not hovered to aid in user orientation and context.

- .messages__item::after {
-   opacity: 0;
-   transition: opacity 0.3s;
- }
+ .messages__item::after {
+   opacity: 0.3; /* Slightly visible by default */
+   transition: opacity 0.3s;
+ }

926-937: Enhance SVG icon interaction in chatbox.

The CSS changes for the chatbox buttons include transitions for SVG fills and background colors. This aligns with the feedback from jsolly about enhancing button interactions by modifying SVG colors directly. This is a good implementation of the suggested design pattern.

#chatbox-container button svg {
  transition: fill 0.3s ease;
}

#chatbox-container button:hover svg path {
  fill: white !important;
}

#chatbox-container button:hover,
#chatbox-container button {
  background-color: transparent !important;
}

954-968: Review chatbox styling adjustments.

The chatbox styling includes significant changes to its appearance and functionality. The use of a fixed position, increased dimensions, and a new background color enhances the chatbox's visibility and user interaction. These changes are consistent with the PR's goal to improve the chatbox design.

.chatbox {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 123456;
}

.chatbox__support {
  background: #f9f9f9;
  width: 350px;
  height: 550px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

1037-1045: Validate new chatbox header styling.

The new styling for the chatbox header uses a gradient background, which is visually appealing and aligns with modern design trends. The use of padding, border-radius, and box-shadow enhances the aesthetic and functional aspects of the chatbox header.

.chatbox__header {
  background: linear-gradient(135deg, #0d6efd, #0a58ca);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

1113-1118: Assess chatbox footer enhancements.

The chatbox footer has been updated with a gradient background and shadow effects, which are consistent with the header styling. This creates a cohesive look for the chatbox and enhances the overall user experience.

.chatbox__footer {
  padding: 10px 20px;
  background: linear-gradient(135deg, #0a58ca, #0d6efd);
  box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.1);
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}

@freedompraise
Copy link
Collaborator Author

@jsolly I've effected the changes

Copy link
Owner

@jsolly jsolly left a comment

Choose a reason for hiding this comment

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

@freedompraise Looks almost perfect. Nice work!

The only issue I found is that clicking the 'x' button does not close the chatbox. I think this is a regression, cause this was working on your earlier commits.

freedompraise and others added 2 commits September 2, 2024 05:24
This commit adjusts the opacity of the textarea placeholder in the main.css file. The opacity was changed from 0 to 0.3 to provide a subtle hint to the user that the textarea is a placeholder. This change improves the user experience by making the placeholder text more visible.

Co-authored-by: John Solly <[email protected]>
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

Commits

Files that changed from the base of the PR and between 57d5f1a and b4e9ca5.

Files selected for processing (2)
  • app/blog/templates/blog/parts/chatbox.html (1 hunks)
  • app/staticfiles/css/main.css (23 hunks)
Files skipped from review as they are similar to previous changes (1)
  • app/blog/templates/blog/parts/chatbox.html
Additional context used
Biome
app/staticfiles/css/main.css

[error] 869-869: Expected a selector but instead found ')'.

Expected a selector here.

(parse)

Additional comments not posted (7)
app/staticfiles/css/main.css (7)

47-51: ** Refactor gradient definitions for consistency.**

The previous suggestion to consolidate the gradient definition for --secondary-gradient into a single line is still applicable:

- --secondary-gradient: linear-gradient(
-   268.91deg,
-   #0d6efd -2.14%,
-   #007bff 99.69%
- );
+ --secondary-gradient: linear-gradient(268.91deg, #0d6efd -2.14%, #007bff 99.69%);

783-783: ** Enhance readability of inline code elements.**

The previous suggestion to adjust the color or add a background to enhance the readability of inline code elements is still applicable:

- p > code {
-   color: #e76f51;
-   font-family: monospace;
-   font-size: 0.95em;
- }
+ p > code {
+   color: #e76f51; /* Consider a darker shade for better contrast */
+   background-color: #f4f4f4; /* Adding a light background for better visibility */
+   font-family: monospace;
+   font-size: 0.95em;
+   padding: 2px 4px; /* Adding padding for better text separation */
+ }

926-928: LGTM!

The transition effect on the SVG icons within the chatbox buttons is a nice touch and improves the user experience.


930-932: LGTM!

Changing the fill color of the SVG icons on hover is a good way to provide visual feedback to the user.


934-937: LGTM!

Setting the background color of the chatbox buttons to transparent allows the chatbox container's background to show through, creating a cohesive look.


940-942: LGTM!

Setting the width and height of the chatbox icon ensures a consistent size for the icon.


947-948: LGTM!

Setting the bottom and right positions of the chatbot container to 20px positions it in the bottom-right corner of the viewport, which is a common placement for chat widgets.

Comment on lines +848 to +869
:is(
h1,
h2,
h3,
h4,
h5,
h6,
strong,
.list-group-item,
svg,
table,
p,
blockquote,
li,
legend,
small,
.word-count,
label,
input,
form,

) {
Copy link

Choose a reason for hiding this comment

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

Fix the syntax error in the CSS selector.

There is a syntax error due to an unmatched closing parenthesis in the :is selector. This issue was previously flagged but not corrected. Please fix the selector as follows:

- :is(
+ :is(

Committable suggestion was skipped due to low confidence.

Tools
Biome

[error] 869-869: Expected a selector but instead found ')'.

Expected a selector here.

(parse)

Copy link
Owner

@jsolly jsolly left a comment

Choose a reason for hiding this comment

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

@freedompraise almost there.

The chat icon should not change color on hover...at least it shouldn't go completely white. I suspect this is an issue in the CSS class hierarchy.
CleanShot 2024-09-02 at 08 00 23

@freedompraise
Copy link
Collaborator Author

Okay

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: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between b4e9ca5 and 2dc6b94.

Files selected for processing (1)
  • app/blog/templates/blog/parts/chatbox.html (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • app/blog/templates/blog/parts/chatbox.html

@freedompraise
Copy link
Collaborator Author

@jsolly awaiting your review

Copy link
Owner

@jsolly jsolly 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! Ready for merge. You can do the merge if you'd like =)

@jsolly jsolly mentioned this pull request Sep 7, 2024
3 tasks
@freedompraise freedompraise merged commit 545a690 into master Sep 9, 2024
3 checks passed
@freedompraise freedompraise deleted the freedompraise/issue406 branch September 9, 2024 09:03
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