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

Create actions menu and render when right-clicking an event #140

Closed
13 tasks
tyler-dane opened this issue Oct 1, 2024 · 0 comments · Fixed by #247
Closed
13 tasks

Create actions menu and render when right-clicking an event #140

tyler-dane opened this issue Oct 1, 2024 · 0 comments · Fixed by #247
Assignees

Comments

@tyler-dane
Copy link
Contributor

tyler-dane commented Oct 1, 2024

As a user, I want to be able to right-click on an event and change its priority, so that I don't have to spend extra time doing so by opening the full event form.

Implementation

Must-Haves: These are the minimum enhancements needed to close this issue.

Actions component

  • Create actions menu component that roughly* matches the below design and includes the following functionality
    • The current priority is filled in (unless the priority is unassigned)
    • When clicking a different priority, the previous priority is unselected. (We're not supporting multiple priorities yet)
    • Clicking 'Edit' closes the actions menu and opens the event form
    • Clicking 'Delete' deletes the event without prompting for confirmation

Opening and closing

  • Render actions menu on right-click
    • This'll require you to prevent default right-click context menu when right-clicking an event. A few ways to do this:
      - use preventDefault() when the event is of type contextmenu (reference this example)
      - Check for the code on the button property of a MouseEvent
      - 0 for the primary button (usually the left button).
      - 1 for the middle button (usually the wheel button).
      - 2 for the secondary button (usually the right button).
      - Confirm whether this approach meets accessibility conventions
  • Closes when left-clicking on any other element (similar to how the normal event form works)
  • Closes when pressing ESC
  • Preserve normal right-clicking behavior when clicking anything that is not an event (eg. empty space on the grid or the header)

Nice-to-Haves: These additional enhancements can be added if the above is finished before the designed End date in this issue. If there is not enough time to finish these, create a new issue, copy-paste them to the new issue, and mention it in the comments. This'll help us prioritize that work in another milestone.

  • Actions menu opens relative to where the event was clicked -- not always in the same place.
    • This helps save users time by having to move the mouse less before using the menu
  • When hovering over a priority circle, its label (eg, Work) shows up above the the circle
  • Uses the following icons: pen-nib and trash from phosphoricons
    • trash is already wrapped in Delete.tsx. A new icon wrapper is needed for the pen icon.
  • Animation renders after changing priority. This animation could be on the event and/or the priority circles in the actions menu. It's up to you what kind of animation to use. The goal is to incentivize the user to make changes by giving them a pleasant UX when they do so.

Designs

** These are rough designs. Your implementation doesn't need to be pixel perfect. If you find ways to improve the design, feel free to adjust. You should also use the colors in the current theme rather than using the colors here.

Image
@tyler-dane tyler-dane added the needs more info Not ready for coding just yet label Oct 1, 2024
@tyler-dane tyler-dane changed the title 🚧 Create Actions menu and render on right-click [WIP] 🚧 Create Actions menu and render on right-click Oct 1, 2024
@tyler-dane tyler-dane removed the needs more info Not ready for coding just yet label Oct 1, 2024
@tyler-dane tyler-dane changed the title 🚧 Create Actions menu and render on right-click Create Actions menu and render on right-click Oct 1, 2024
@tyler-dane tyler-dane added the needs more info Not ready for coding just yet label Oct 2, 2024
@tyler-dane tyler-dane removed this from v1 Cleanup Dec 2, 2024
@tyler-dane tyler-dane moved this to Backlog in 🏗 Compass Roadmap Dec 3, 2024
@tyler-dane tyler-dane changed the title Create Actions menu and render on right-click Create actions menu and render on right-click Jan 24, 2025
@tyler-dane tyler-dane changed the title Create actions menu and render on right-click Create actions menu and render when right-clicking on an event Jan 24, 2025
@tyler-dane tyler-dane removed the needs more info Not ready for coding just yet label Jan 24, 2025
@tyler-dane tyler-dane moved this from Backlog to Ready in 🏗 Compass Roadmap Jan 24, 2025
@tyler-dane tyler-dane changed the title Create actions menu and render when right-clicking on an event Create actions menu and render when right-clicking an event Jan 25, 2025
@tyler-dane tyler-dane linked a pull request Feb 8, 2025 that will close this issue
@github-project-automation github-project-automation bot moved this from Ready to Done in 🏗 Compass Roadmap Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants