-
Notifications
You must be signed in to change notification settings - Fork 492
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
chore: open ContextMenu on right-click #929
Conversation
Hmm... I like the idea of opening it with right-click but I believe it's not a good UX not to open it where we clicked. It was completely unexpected when the menu opened in the other end of the screen. Usually our instinct tells us to right click on the icon or name. I think we should give this a bit more work to open the place we click. I found two packages that seem helpful: |
I 💯 agree. I'll give this another stab today! |
The last commit opens the ContextMenu where the user right-clicked: TODO:
|
This is ready for review! 🌟 |
@fsdiogo I tried to right click and got this: I made sure the dependencies were up to date. It seems that |
Hmm, just tested on Firefox and that error came up. It works on Chrome and Safari. I'll look into it! |
Fixed! |
Just as a FYI, I used Chrome too, not FF. Lemme check. |
@fsdiogo working here and looking good. The CI is failing though both on build and navigation. :/ |
it's a dependencies issue > ipfs-webui@2.3.2 build:darwin:linux /home/travis/build/ipfs-shipyard/ipfs-webui
> cross-env REACT_APP_GIT_REV=`git rev-parse --short HEAD` react-scripts build
Creating an optimized production build...
Failed to compile.
Module not found: Error: Can't resolve 'webcrypto-shim' in '/home/travis/build/ipfs-shipyard/ipfs-webui/node_modules/libp2p-crypto/src'
|
Latest: 6.5.0 |
reverting the unrelated changes to the package-lock.json fixes the error, so I'm going to push that change to this branch. |
License: MIT Signed-off-by: Oli Evans <oli@tableflip.io>
Can you take a look at the code so we can merge this? We should release a new version of Web UI ASAP to fix the add files regression. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌 neat change and a good tidy up!
The ContextMenu was a standalone component but to add the ability to be opened by right-clicking a file I had to refactor it a bit and couple its logic to the File component.
Right-clicking a file now opens the context menu, but always in the default position. I've tried to open it where the user clicked but that was taking a lot of time and I don't see this as a priority right now.
Closes #917.