Skip to content
This repository was archived by the owner on May 12, 2026. It is now read-only.

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

Merged
Rokt33r merged 2 commits into
BoostIO:masterfrom
ehhc:right_click_preview
Sep 30, 2018
Merged

Implementing a context menu handler to show an attachment in the expl…#2418
Rokt33r merged 2 commits into
BoostIO:masterfrom
ehhc:right_click_preview

Conversation

@ehhc

@ehhc ehhc commented Sep 26, 2018

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

@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
Copy Markdown
Contributor

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

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

2018-09-28 18 13 57

@ehhc

ehhc commented Sep 28, 2018

Copy link
Copy Markdown
Contributor Author

@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
Copy Markdown
Contributor

@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

ehhc commented Sep 28, 2018

Copy link
Copy Markdown
Contributor Author

@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
Copy Markdown
Contributor

@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

ehhc commented Sep 28, 2018

Copy link
Copy Markdown
Contributor Author

@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

ehhc commented Sep 28, 2018

Copy link
Copy Markdown
Contributor Author

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

@ZeroX-DG

Copy link
Copy Markdown
Member

Confirm that it works on Linux Mint

@sosukesuzuki

Copy link
Copy Markdown
Contributor

@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

@sosukesuzuki sosukesuzuki left a comment

Copy link
Copy Markdown
Contributor

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

ehhc commented Sep 30, 2018

Copy link
Copy Markdown
Contributor Author

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

4 participants