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

Implementing a context menu handler to show an attachment in the expl… #2418

Merged
merged 2 commits into from
Sep 30, 2018

Conversation

ehhc
Copy link
Contributor

@ehhc ehhc commented Sep 26, 2018

It would be nice to open the location of an attachment with the explorer -> Implementing a contextMenu in the MarkdownPreview to do this :)

@ZeroX-DG ZeroX-DG added the awaiting review ❇️ Pull request is awaiting a review. label Sep 27, 2018
@sosukesuzuki
Copy link
Member

@ehhc
It cannot work in my local environment(MacOS 10.13.5)...
2018-09-28 16 55 13
(/Users/suzuki/Downloads/History.plist exists.)

@sosukesuzuki
Copy link
Member

It works when I fixed like below... 🤔
(MarkdownPreview#L-240)

click: (e) => shell.showItemInFolder('/' + absPath)

2018-09-28 18 13 57

@ehhc
Copy link
Contributor Author

ehhc commented Sep 28, 2018

@sosukesuzuki but your solution would break it on windows platform.. I will think about a platform independent solution :)

Edit: i don't understand why it works at all.. your markdown content dosen't look like you inserted it as an attachment.. there the link in the markdown content should be something like :storage\...... then the generated link would start with file:///. Does it works then?

@sosukesuzuki
Copy link
Member

@ehhc
Sorry, I was misunderstanding.:bow: The file(History.plist) is not inserted as attachment, on the image which I uploaded.

I tried to insert same file (History.plist) as attachment, but It cannot work...
2018-09-28 20 24 06

@ehhc
Copy link
Contributor Author

ehhc commented Sep 28, 2018

@sosukesuzuki in that case i have no idea why i dosen't work.. on my windows 10 it works .. :( no idea whats different..

@sosukesuzuki
Copy link
Member

@ehhc Umm..., I have no idea too. I'll put label "help wanted!".

@sosukesuzuki sosukesuzuki added the help wanted 🆘 Pull request/issue requires extra help from the community. Check these out if you're new! label Sep 28, 2018
@ehhc
Copy link
Contributor Author

ehhc commented Sep 28, 2018

@sosukesuzuki i think the problem may be that i hard-coded the way i removed the file-prefix.. i'm using an library to do so now.. hopefully that solves the issue. Would you do me a huge favor and test it again?

Steps to reproduce:

  1. drag&drop a file into the editor
  2. Right-click on the link of the attachment in the markdown-preview
  3. "Show in explorer" should be visible and should open the explorer at the location of the attachment

Thank you for your help :)

@ehhc
Copy link
Contributor Author

ehhc commented Sep 28, 2018

I think the library i'm using now solves exactly your problem (that the paths are different on linux systems).. :)

@ZeroX-DG
Copy link
Member

Confirm that it works on Linux Mint

@sosukesuzuki
Copy link
Member

@ehhc Confirm that it works on my local environment!(MacOS 10.13.5)

@sosukesuzuki sosukesuzuki removed the help wanted 🆘 Pull request/issue requires extra help from the community. Check these out if you're new! label Sep 29, 2018
Copy link
Member

@sosukesuzuki sosukesuzuki left a comment

Choose a reason for hiding this comment

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

LGTM:smile:

@sosukesuzuki sosukesuzuki added next release (v0.11.10) and removed awaiting review ❇️ Pull request is awaiting a review. labels Sep 29, 2018
@ehhc
Copy link
Contributor Author

ehhc commented Sep 30, 2018

Thanks guys :)

@Rokt33r Rokt33r merged commit 04bb04a into BoostIO:master Sep 30, 2018
@ehhc ehhc deleted the right_click_preview branch October 1, 2018 06:43
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.

None yet

4 participants