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

VIDCS-3475: Provide better styling for the Send button in the Feedback panel #107

Merged
merged 2 commits into from
Mar 3, 2025

Conversation

cpettet
Copy link
Contributor

@cpettet cpettet commented Feb 28, 2025

What is this PR doing?

Description

Fixes the styling on the Feedback panel

Screenshots and GIF

report-issue-gif
Screenshot 2025-02-28 at 12 00 14 PM
Screenshot 2025-02-28 at 12 00 29 PM

How should this be manually tested?

  • checkout this branch
  • apply the following diff
diff --git a/frontend/src/hooks/useRightPanel.tsx b/frontend/src/hooks/useRightPanel.tsx
index 039923e..a70d866 100644
--- a/frontend/src/hooks/useRightPanel.tsx
+++ b/frontend/src/hooks/useRightPanel.tsx
@@ -22,7 +22,7 @@ export type UseRightPanel = {
  */
 const useRightPanel = (): UseRightPanel => {
   const [rightPanelState, setRightPanelState] = useState<RightPanelState>({
-    activeTab: 'closed',
+    activeTab: 'issues',
     unreadCount: 0,
   });
  • copy snippet above and use terminal command: pbpaste | git apply
  • check everything looks okay in a variety of viewports

What are the relevant tickets?

A maintainer will add this ticket number.

Resolves VIDCS-3475

Checklist

[ ] Branch is based on develop (not main).
[ ] Resolves a Known Issue.
[ ] If yes, did you remove the item from the docs/KNOWN_ISSUES.md?
[ ] Resolves an item reported in Issues.
If yes, which issue? Issue Number?

Comment on lines +83 to +87
overflowX: 'hidden',
overflowY: 'auto',
display: 'flex',
flexDirection: 'column',
height,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These are the tailwindcss classes in the eliminated div above.

Comment on lines +80 to +81
ml="25px"
mr="25px"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was wondering why things looked a little off 😅

v-kpheng
v-kpheng previously approved these changes Feb 28, 2025
Copy link
Collaborator

@v-kpheng v-kpheng left a comment

Choose a reason for hiding this comment

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

LGTM! 💪 🚀

const widthClass = isSmallViewport ? '@apply w-[calc(100dvw_-_48px)]' : '';
// Account for: 64px panel header + 80px toolbar if small viewport or 96px toolbar if normal viewport + (40px submit button + 24px submit button margin)
const height = isSmallViewport ? 'calc(100dvh - 208px)' : 'calc(100dvh - 224px)';
const width = isSmallViewport ? 'calc(100dvw - 50px)' : '310px';
Copy link
Collaborator

@v-kpheng v-kpheng Feb 28, 2025

Choose a reason for hiding this comment

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

60 + 80 = 124
64 + 80 = 144 (🙈 .... remind me never to help my kids with math 😄)
40 + 24 = 64

How do we arrive that the magic literals used here? Just curious.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great question that others would surely have! I added that into the last commit. Let me know if it's not clear.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Naively, seems like we can use variables to calculate these CSS values. That said, a tech debt item for another day, if we decide to cross that bridge.

Copy link
Collaborator

@v-kpheng v-kpheng left a comment

Choose a reason for hiding this comment

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

LGTM! 💪 🚀

const widthClass = isSmallViewport ? '@apply w-[calc(100dvw_-_48px)]' : '';
// Account for: 64px panel header + 80px toolbar if small viewport or 96px toolbar if normal viewport + (40px submit button + 24px submit button margin)
const height = isSmallViewport ? 'calc(100dvh - 208px)' : 'calc(100dvh - 224px)';
const width = isSmallViewport ? 'calc(100dvw - 50px)' : '310px';
Copy link
Collaborator

Choose a reason for hiding this comment

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

Naively, seems like we can use variables to calculate these CSS values. That said, a tech debt item for another day, if we decide to cross that bridge.

Copy link
Collaborator

@maikthomas maikthomas left a comment

Choose a reason for hiding this comment

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

LGTM!

@behei-vonage
Copy link
Contributor

tested, LGTM 🚀

@cpettet cpettet merged commit 4062a59 into develop Mar 3, 2025
7 checks passed
@cpettet cpettet deleted the cpettet/vidcs-3475-style-send-button branch March 3, 2025 15:37
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.

4 participants