Skip to content

Feat: [PR 1/3] Core FAB Foundation#49

Closed
Aaratrika-Shelly wants to merge 2 commits intoSrinjoyeeDey:mainfrom
Aaratrika-Shelly:feature/quick-action-buttons
Closed

Feat: [PR 1/3] Core FAB Foundation#49
Aaratrika-Shelly wants to merge 2 commits intoSrinjoyeeDey:mainfrom
Aaratrika-Shelly:feature/quick-action-buttons

Conversation

@Aaratrika-Shelly
Copy link

@Aaratrika-Shelly Aaratrika-Shelly commented Oct 6, 2025

Description (PR 1 of 3)

This is the first of three planned pull requests to implement the new Floating Action Button (FAB) feature, as discussed in the comments.

This foundational PR includes:

  • A new EmergencyFab.tsx component.
  • The core FAB with a functional expand/collapse state (isOpen).
  • A simple vertical menu of the three action buttons.
  • Full compatibility with the project's Dark/Light mode theme.
  • Bonus: Removed an unused api import and function from the Dashboard for better code health.

This PR intentionally does not include animations or tooltips, as those will be handled in PR #2.

Related Issue

Screenshots

Desktop View:
image
image

Mobile View (Expanded Menu):
image
image

@SrinjoyeeDey
Copy link
Owner

Hey @Aaratrika-Shelly , thanks again for working on the Quick Actions buttons! 🙌

I wanted to give a detailed suggestion to make the Quick Actions menu professional, visually appealing, and very user-friendly. Right now, the three big buttons beside the map feel a bit overwhelming and colorful. Here’s a more structured approach:


  1. Placement & Structure

Use a Floating Action Button (FAB) instead of large standalone buttons beside the map.

Place it in the bottom-right corner of the map.

On click, it expands to reveal the three quick actions: Report Issue, Check Safe Route, Send Assets.

This keeps the map clean and uncluttered while ensuring the actions are always accessible.


Layout Example :

[ Map Area ]

                  ⬤  Quick Actions (FAB)
                  (Click to expand)

On click (vertical stack):

┌───────────────┐
│ Report Issue │
├───────────────┤
│ Safe Route │
├───────────────┤
│ Send Assets │
└───────────────┘

  • The buttons appear in a smooth vertical stack.
  • Optional: subtle shadow and fade-in animation to make them feel “floating”.

Radial expansion around the FAB can also be used for a modern, professional look.


  1. Colors & Style

Muted tones or single accent color: Avoid bright red, blue, green. Use subtle, professional colors.

Subtle shadows or glows: Creates a “floating” effect without being distracting.

Consistency: All buttons should follow the same style for a clean and professional design.


Important
4. Interactions & Animations (Detailed Explanation)

Here’s how each feature should behave to make the buttons quick, intuitive, and professional:

a. Hover Effects

When the user hovers over a button (or taps on mobile), it should have a subtle visual change:

Slight scale-up (e.g., 1.05x) to indicate it’s interactive.

Slight shadow enhancement to make the button feel “lifted” from the map.

Benefit: Users can immediately recognize which element is clickable, improving speed and confidence.

b. Click Effects

When a user clicks/taps a button:

Add a ripple, fade, or brief color change to show the action has been registered.

Can also include a tiny slide or bounce animation for feedback.

Benefit: Gives users instant feedback, so they don’t have to guess whether the action worked.

c. Animated Expansion/Collapse

The FAB should expand smoothly to reveal all three actions, using:

Vertical slide, fade-in, or gentle bounce.

When collapsing, the buttons should slide/fade back smoothly.

Benefit: Makes the menu feel polished and intuitive, while keeping the map uncluttered.

d. Tooltips

Small text descriptions appear on hover or long press on mobile.

Example: “Report Issue → Report any safety hazard near your location.”

Benefit: Helps new users understand the function without reading documentation.

e. Badge Notifications

Small badges can appear on buttons for dynamic updates.

Example: a small number on “Send Assets” if there are pending items.

Benefit: Users can quickly see urgent or new items at a glance.

f. Expandable Mini Menu

FAB should allow buttons to expand vertically or radially with smooth easing.

Benefit: Efficient use of space and visually appealing for the user.

[optional]
h. Context-Sensitive Actions

Buttons can adapt based on zoom level, location, or nearby points of interest.

Example: “Safe Route” highlights only when the user is near a road or path.

Benefit: Speeds up user decisions and avoids showing irrelevant options.

i. Dark/Light Mode Adaptation

Buttons should automatically adjust colors, shadows, and hover effects depending on the theme.

Benefit: Professional appearance across themes, better readability, and user comfort.

j. Integration with Notifications

Clicking actions can trigger toast messages, subtle animations, or alerts.

Example: “Report Issue submitted successfully” slides in briefly at the bottom.

Benefit: Immediate visual confirmation improves trust and usability.


This layout and behavior would make the Quick Actions menu both visually appealing and extremely functional. feel free to reach out on further questions

@SrinjoyeeDey
Copy link
Owner

@Aaratrika-Shelly , Prefer to work on the above adjustments and right after that I will merge , please notify me about your actions , looking forward for your PR soon , Thank YOu

@Aaratrika-Shelly
Copy link
Author

Hi @SrinjoyeeDey,
Thank you for the detailed feedback and the new vision for this feature! A Floating Action Button (FAB) is a great idea, and I agree it would make the UI cleaner.
As this is a significant increase in scope, I'd like to propose an iterative approach to keep things moving. How about I update this PR to implement just the basic FAB structure as a first step?

My plan would be:

Remove the current "Quick Actions" card from the layout.

Create a new FAB component that is positioned in the bottom-right corner of the map area.

Implement the state management so that clicking the FAB toggles the visibility of the three action buttons.

The action buttons will appear in a simple, clean vertical stack above the FAB when it's open.

This PR would deliver the core functionality of the FAB. The more advanced features like custom animations, tooltips, and context-sensitive actions could then be tackled in future issues.
This approach will provide a solid foundation to build upon. Please let me know if a PR with this more limited, foundational scope would be acceptable for merging."

@SrinjoyeeDey
Copy link
Owner

SrinjoyeeDey commented Oct 7, 2025

Yes go ahead @Aaratrika-Shelly , but I would like you to modify the following [let me know if you can ]

a.Tooltips

Small text descriptions appear on hover or long press on mobile.

Example: “Report Issue → Report any safety hazard near your location.”

Benefit: Helps new users understand the function without reading documentation.
b. Expandable Mini Menu

FAB should allow buttons to expand vertically or radially with smooth easing.

Benefit: Efficient use of space and visually appealing for the user

c. Dark/Light Mode Adaptation

Buttons should automatically adjust colors, shadows, and hover effects depending on the theme.

Benefit: Professional appearance across themes, better readability, and user comfort.

d. Integration with Notifications

Clicking actions can trigger toast messages, subtle animations, or alerts.

Example: “Report Issue submitted successfully” slides in briefly at the bottom.

Benefit: Immediate visual confirmation improves trust and usability.

@Aaratrika-Shelly
Copy link
Author

Hi @SrinjoyeeDey
Thank you for the clear direction! I'm excited to build this feature to your specifications.
To deliver this complex feature in a structured and high-quality way, I'd like to propose splitting the work into three focused Pull Requests. This will make the review process faster and easier for you.
Here is my proposed plan:

PR #1: The Core FAB Foundation
This PR will deliver the main, functional component. It will include:
The basic Floating Action Button (FAB) with the expand/collapse state.
The vertical menu of the three action buttons (without animations).
Full Dark/Light mode compatibility.

PR #2: Animations & User Feedback
Building on the first PR, this one will focus on the user experience of the menu itself. It will add:
A smooth "slide and fade" animation for when the menu expands and collapses.
Hover tooltips for each of the action buttons.

PR #3: System Integration & Notifications
The final PR will connect the component to the wider application. It will add:
Integration with the project's toast notification system to confirm when an action is taken.

This phased approach ensures each part is well-tested and allows you to merge progress incrementally. Please let me know if this three-part plan works for you!"

@SrinjoyeeDey
Copy link
Owner

Ok go ahead @Aaratrika-Shelly , Hope to see your PR soon

@SrinjoyeeDey
Copy link
Owner

Hi @Aaratrika-Shelly , any updates ? Would like to know how much you have progressed

@Aaratrika-Shelly Aaratrika-Shelly force-pushed the feature/quick-action-buttons branch from 594fcaf to 3e781f9 Compare October 8, 2025 19:39
@Aaratrika-Shelly Aaratrika-Shelly changed the title Feature/quick action buttons Feat: [PR 1/3] Core FAB Foundation Oct 8, 2025
@SrinjoyeeDey
Copy link
Owner

SrinjoyeeDey commented Oct 8, 2025

Hi @Aaratrika-Shelly , the layout is perfect but from the screenshot I could see the old dashboard . Recently multiple features have been updated, make sure to update your local repo with latest changes and then make your own changes and then commit or push the PR to prevent conflicts

@SrinjoyeeDey
Copy link
Owner

Also resolve the existing merge conflicts

@Aaratrika-Shelly
Copy link
Author

hi @SrinjoyeeDey I just noticed. I will do the needful and submit it soon.

@Aaratrika-Shelly Aaratrika-Shelly force-pushed the feature/quick-action-buttons branch from 3e781f9 to 644fe22 Compare October 8, 2025 20:24
@SrinjoyeeDey
Copy link
Owner

Hii @Aaratrika-Shelly , any progress ?

@Aaratrika-Shelly
Copy link
Author

Hi @SrinjoyeeDey
I have already made the first PR after resolving the merge conflicts with the new dashboard ui earlier
Kindly review

@SrinjoyeeDey
Copy link
Owner

Hii @Aaratrika-Shelly , can you connect the buttons with the backend so that the buttons are functional or are you only comfortable with the frontend

@Aaratrika-Shelly
Copy link
Author

Hi @SrinjoyeeDey,
Yes, I can definitely handle connecting the buttons to the backend! I have experience with full-stack development.
To keep the PRs focused and easy to review, this backend integration fits perfectly into the plan for PR #3 (System Integration & Notifications) that we discussed.
My plan is to:
Get this current PR (#1) for the UI foundation merged.
Complete PR #2 for the animations and tooltips.
Then, in PR #3, I will implement all the backend API calls to make the buttons fully functional, along with the toast notifications.
This keeps the original 3-part plan intact and ensures each piece is reviewed and merged cleanly. Please let me know if you're happy with the current state of this PR, as merging it will unblock me to start on PR #2.

@SrinjoyeeDey
Copy link
Owner

SrinjoyeeDey commented Oct 9, 2025

okayy go ahead, but I would like you to split it into 2 sections @Aaratrika-Shelly - 1) UI and animations and tooltips 2) backend API calls to make the buttons fully functional, along with the toast notifications. , If its okay with you then you can update this current PR with animation and tooltips and I will merge it . Then raise a new issue to implement API calls and I will assign you, make sure to update your current repo everytime

@Aaratrika-Shelly
Copy link
Author

Hi @SrinjoyeeDey,
Thank you! I'm glad we've landed on a multi-PR approach.
After reviewing the remaining tasks (animations, tooltips, and backend), I strongly believe that the original 3-PR plan is the best path forward to ensure the highest quality for each piece.
Animations and tooltips are both significant UX features that deserve their own focused review. Combining them with the foundational UI makes the first PR quite large and complex.
Would it be okay if we proceed with the 3-PR plan?
PR #1 (This one): The core UI foundation, which is complete and ready to merge.
PR #2: The animations and tooltips.
PR #3: The backend integration.
This ensures each PR remains small, focused, and easy for you to review quickly. It will also allow me to deliver a more polished and well-tested final feature.
I'm ready to start on the animations immediately and will be quick with the second PR as soon as this foundational one is merged."

@SrinjoyeeDey
Copy link
Owner

SrinjoyeeDey commented Oct 10, 2025

Okay @Aaratrika-Shelly , Then I guess you have to raise other two issues and then submit the PR . You can raise them and explain in details exactly what improvements would you like to implement. Also for the animation and tooltips I would like to have some unique hover effects and some extra features added to it . Happy to see you contributing. I will merge it .

@SrinjoyeeDey
Copy link
Owner

Hii @Aaratrika-Shelly , I will merge this PR but I just wanted to highlight something before merging — recently, the dashboard has been updated . If I merge your PR right now, it might overwrite those recent changes since your local repo seems to be behind the latest version. can you please update your local repo and then make the changes so that I can merge this PR

@Aaratrika-Shelly Aaratrika-Shelly force-pushed the feature/quick-action-buttons branch from 644fe22 to 0955037 Compare October 10, 2025 20:31
@Aaratrika-Shelly
Copy link
Author

"Hi @SrinjoyeeDey,
You were right! Thanks for the heads-up.
I have now rebased my branch on top of the latest version of main to ensure a clean merge. All conflicts have been resolved, and the PR is fully up-to-date and ready to go.
Thank you for your guidance!"

@SrinjoyeeDey
Copy link
Owner

SrinjoyeeDey commented Oct 11, 2025

Heyy @Aaratrika-Shelly , your PR shows the old animation on the dashboard cards and also Home route is not redirecting to the landing page , if I merge yours it might overlap . Please make sure it is up to date

@Aaratrika-Shelly Aaratrika-Shelly force-pushed the feature/quick-action-buttons branch from 0955037 to 717aecc Compare October 11, 2025 07:45
@Aaratrika-Shelly
Copy link
Author

Hi @SrinjoyeeDey,
Thank you for being so thorough with the review! You're right, the main "compare" view that GitHub shows after a rebase can be incredibly confusing and make the changes look much larger than they are. I've been caught by that myself before!
I've double-checked everything, and I'm happy to confirm that the actual changes in this PR are very small. The "Files Changed" tab gives a clearer summary: it's just the 1 new file (EmergencyFab.tsx) and the few lines added to Dashboard.tsx.
To show that it all integrates perfectly with the latest design, here’s a screenshot from my local environment:
image
The branch is fully up-to-date and safe to merge. Thank you again for your careful review!

@SrinjoyeeDey
Copy link
Owner

Hey @Aaratrika-Shelly , thanks for your contribution earlier!
I just wanted to show you the animation that was originally present in the dashboard — this is the effect I’d like to retain.
problem-preview
It seems your current branch doesn’t include this version of the file, so the animations are missing when I check out your PR.
Could you please pull the latest main branch first, check how the animation looks, and then make your changes over that updated version?
That way, the animations and translations remain intact when we merge your PR.

@SrinjoyeeDey
Copy link
Owner

SrinjoyeeDey commented Oct 11, 2025

Check that the dashboard cards have a glassmorphic effect, in your PR the dashboard cards animation is not visible

@Aaratrika-Shelly Aaratrika-Shelly force-pushed the feature/quick-action-buttons branch from 717aecc to 97f4916 Compare October 11, 2025 20:49
@Aaratrika-Shelly
Copy link
Author

Hi @SrinjoyeeDey,
I have now successfully rebased my branch on top of the latest main and resolved all the issues.
To confirm that all the new dashboard animations and styles are perfectly intact, here is a screenshot of my final branch running locally. The FAB is integrated correctly with no overlaps.
Screenshot 2025-10-12 021515
Screenshot 2025-10-12 021657

The PR is 100% up-to-date and safe to merge. Thank you for your guidance!

@Aaratrika-Shelly
Copy link
Author

Hi @SrinjoyeeDey,
It seems this Pull Request has gotten into a corrupted state on GitHub that is showing some phantom merge conflicts and a confusing diff, even though my local branch is fully up-to-date and working perfectly.
To make the review process as clean and easy as possible for you, I am closing this PR.
I have already prepared a brand new, clean Pull Request from a fresh branch that correctly shows the simple changes. I will be opening it immediately.
Sorry for any confusion, and thank you for your patience!
new PR no- #115

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