Skip to content

Fix padding bug + add space for new chats too#298

Merged
nang-dev merged 1 commit into
trypear:mainfrom
tokaa1:main
Apr 16, 2025
Merged

Fix padding bug + add space for new chats too#298
nang-dev merged 1 commit into
trypear:mainfrom
tokaa1:main

Conversation

@tokaa1
Copy link
Copy Markdown

@tokaa1 tokaa1 commented Apr 12, 2025

Sometimes the padding of chat content would be wrong and look like this (input container is on top of the text):
Screenshot 2025-04-12 at 7 04 59 PM
Also during first message of new chats, output would be covered by cancel button.
Screenshot 2025-04-12 at 5 40 52 PM

Ts pmo 😜👺👺😿😿😿
This fixes both issues, now they always look normal!

Screenshot 2025-04-12 at 5 46 00 PM
Couldn't get a screenshot of second fix (it's just how it normally looks)


Important

Fixes chat padding and cancel button coverage issues in GUI() by adjusting padding logic in gui.tsx.

  • Behavior:
    • Fixes padding issue in GUI() by removing conditional padding logic for new sessions.
    • Ensures cancel button does not cover first message in new chats by adjusting padding calculation.
  • Functions:
    • Updates adjustPadding in gui.tsx to calculate padding based on inputContainerRef height.
    • Modifies useEffect for ResizeObserver to consistently apply padding adjustments.

This description was created by Ellipsis for 147e2e5. It will automatically update as commits are pushed.

@tokaa1 tokaa1 requested review from a team, Fryingpannn and nang-dev as code owners April 12, 2025 21:52
Copy link
Copy Markdown

@ellipsis-dev ellipsis-dev Bot 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! Reviewed everything up to 147e2e5 in 52 seconds

More details
  • Looked at 25 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 5 drafted comments based on config settings.
1. gui/src/pages/gui.tsx:235
  • Draft comment:
    Ensure removal of isNewSession logic for newPadding is intentional. This always applies padding, which aligns with the new chat spacing fix.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50%
    None
2. gui/src/pages/gui.tsx:370
  • Draft comment:
    Updated adjustPadding to compute height internally (removing parameter). Verify that all onHeightChange callers no longer require a height argument.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50%
    None
3. gui/src/pages/gui.tsx:235
  • Draft comment:
    Removed the isNewSession condition when calculating padding. Confirm that always adding ${height + 20}px for padding is the intended behavior for new sessions.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
4. gui/src/pages/gui.tsx:376
  • Draft comment:
    The adjustPadding callback now fetches the height from inputContainerRef and removes its parameter. Confirm that the ContinueInputBox's onHeightChange callback no longer needs to pass a height.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
5. gui/src/pages/gui.tsx:186
  • Draft comment:
    It appears that 'OFFSET_HERUISTIC' might be a typographical mistake. Perhaps you intended to use 'OFFSET_HEURISTIC'?
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.

Workflow ID: wflow_hyvSRCXKjKcMIKDS


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@nang-dev
Copy link
Copy Markdown

Shieeee ok

@nang-dev
Copy link
Copy Markdown

nang-dev commented Apr 16, 2025

Tysm, we r taking a look

@nang-dev nang-dev merged commit 79e54b1 into trypear:main Apr 16, 2025
1 check passed
@nang-dev
Copy link
Copy Markdown

nang-dev commented Apr 21, 2025

@Himanshu-Singh-Chauhan @tokaa1

image

i think this messes stuff up on PearAI Chat when we enlarge text (cmd+"+")

we'll need to revert or fix!

tokaa1 added a commit to tokaa1/pearai-submodule that referenced this pull request Apr 21, 2025
@tokaa1
Copy link
Copy Markdown
Author

tokaa1 commented Apr 21, 2025

@nang-dev Revert pr is here pr

nang-dev pushed a commit that referenced this pull request Apr 21, 2025
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