-
Notifications
You must be signed in to change notification settings - Fork 176
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
Slack: In "search results", clicking "Open-in-Channel" or any searched message opens it in an EXTERNAL web browser #1007
Comments
Duplicate of #87 This is a known behavior - since many websites build up the underlying HTML differently (add to that the javascript-based click handling makes it more complex). Suffice to say that Ferdium won't be able to handle each and every combination from all websites. We are treating this as a feature enhancement for the future. |
I think there is a mis-communication on understanding the issue here.
Each of the words in that header only (not the BODY of the message), appears as a "clickable" item. The expected behavior when clicking "View in channel" is for that same message to open up in Slack under Ferdium's control, however, instead an EXTERNAL browser it launched and a login attempt is made to slack on the external browser.. Hopefully this is clear, not talking about user generated html or URLs or message body, clicking on the HEADER field only as explained above. |
The rendering of the text as links is not something that Ferdium ever does. That seems to be something that's in the Slack web-ui (I dont use slack, and so can't check this by myself). And for any link that appears, depending on whether the underlying html has a |
Reopening to continue discussion. but most likely, if this is dealing with how links are opened in Ferdium, we don't have a solution for this at all since each website behaves differently |
Vijay, will try again.
View in channel on the right side bunch of "elements", "inherited from ..." but nothing that appears as a URL or a target=_blank or similar, not sure how the url is derived from this text, it seems some hidden url.
|
Can you please share some screenshots? Also, there was a different bug that was fixed in the latest nightly - please run the latest and then get back with further details. |
Thanks... No worries about screenshots. Slack support responded.. This is so-called "expected" behavior when searching between multiple "workspaces", the slack/app-generated URL opens a NEW TAB on desktop browser, and even more ridiculously it offers to open a new BROWSER on an android phone with the slack APP... yes, that's right, in Android App, clicking that link, offers to open new browser on the android(?!@@), it does not offer to open that page in current Slack APP.. go figure.. After selecting which browser, it opens, then redirects to the Slack APP... boy.. If there's a way to TRAP all https://.slack.com/client... URLs and translate them into "Ferdium" slack framework, possibly this will be a very useful (optional) feature for slack plugin, that would make Ferdium favorable to use in such cases, again, only for system/slack.com urls, anything else remains as today. |
@stormy1777 - since I don't use Slack, could you please try with something similar to: https://github.com/vraravam/ferdium-recipes/blob/main/recipes/gmail/webview.js#L9-L15 (change the values for slack, and of course, it needs to be done within the slack configuration. Please make the changes in your If you want, I can come and help on zoom to walk you through the changes and help take this further |
@stormy1777 - I have just merged an implementation in this PR: ferdium/ferdium-recipes#29 - it should be available for you in the next nightly. Thanks |
Thanks for the effort, took the lines at tail of this added them to Webview.js in Ferdium/recpies/slack folder, and did not see any difference in behavior, urls still jump externally to browser, similar links: https://app.slack.com/client/T0168MWKGG4/.... Thought it might be "http" vs "https", changed, restart Ferdium, but again, same behavior.. so, not sure what needs to take place to include such urls within the app, and not jump ship (to external browser) maybe need to specifically say contains: 'slack.com/client'.. Can test any other idea... |
Now noticed that "sign into another workspace" from the "add workspaces" menu option also jumps to external browser, url as: https://app.slack.com/workspace-signin/..... Similar tools-> Workflow builder jumps to external with this url: https://app.slack.com/workflow-builder/..... not sure how this is supposed to work if these go to external browser :) :) the whole point of the dedicated app is to retain all within it, eliminating the need for external browser. (Not talking about user data that may contain random URLs, which may necessitate an external browser, the app itself i would think should be self-contained within Ferdium). |
That's the intent, but if the website authors do such special handling to explicitly open external browsers, there's only so much that Ferdium devs can do. I was able to test my same exact changes (with and without) on Ferdium's own discord channel - and they worked seamlessly as expected. Without those changes, link-clicks opened my external default browser, while with them, the link-clicks opened in Ferdium's same service (even for URLs of other websites eg github). Not sure how much more I can help here. |
Updated to nightly.37, see the changes in slack/webview.js; same as what I've typed the other day (with "http" not "https" as i've also attempted), still, when clicking a link in HEADER of message that belongs to another workspace it attempts to open up in a new BROWSER :) :) URL in browser appears as: https://app.slack.com/client/T6Z090R..... I may be wrong, but I think we're (still) talking about different things for some reason... The links are NOT text that is written by users in a message., it is generated by the Slack "app" automatically. no way to control content/layout of that URL, it's just a clickable item, and it only happens after SEARCHING, and only when clicking on a message from ANOTHER workspace than the current one :) If all these conditions exist, then it "jumps into an external browser".. the question is can these "clicks" be "trapped" by the engine/logic.. you say "website authors do ... special handling".. From what I see it's just a URL, no where do they launch Firefox or Chrome specifically via javascript or otherwise, or do you think that is what's happening here? Sorry, I just don't know enough... but can't see how they would know the path to launch an external program from. |
Unfortunately, as I have stated before, I dont use slack, and I can't visualize/reproduce/experiment with the scenario that you describe. I thought a screenshot wold be helpful - but, that's also not there. I will let someone else try to help out on this one. |
Here is how general purpose Slack Search result look like: the "header" of each message has a line as follows: #channel-name-slk Workspace-name – May 16th View in channel So, 4 "clickable" fields [ sometimes only 2 are visible, as in photo above]
What I've observed is that when clicking on hits WITH a Workspace NAME printed (meaning the hit is from a DIFFERENT workspace than our current one), then (on Ferdium) an external browser is launched by the act of clicking the link. If further questions, feel free to ping in private if that is possible/desirable. |
I have reverted the changes to the slack recipe since that didn't seem to fix your problem. In fact, it brought up more issues #158 as an example. Please try with the next nightly, and we can try to find a proper solution for this. |
Honestly the way you describe it @stormy1777 (opening browser with the different workspace) sounds like how I'd want it to behave. How else am I supposed to get back to the original workspace I was in? But I don't really use cross-workspace Slack :) So it's not really an issue for me. |
@MagicLegend how does one go "back" in any browser context environment? Maybe BACK button ? :) :) Ran nightly.38, and same as before, at least we didn't break anything else :) :) I use slack, but do not know enough how to or what to translate these urls into for it to remain in same window/tab (Ferdium)... |
The answer is in your comment: Since Ferdium's services are just chromium tabs, a simple keyboard shortcut to go back is |
Thanks @vraravam was just joking a bit :) Thanks for full explanation, i think nav bar is in Settings -> General (not Appearance) |
Have you tried it in Slack? It will work, but it'll go through all your previous actions first (i.e. channel switches). Not very ideal if you ask me. But why wouldn't the |
Friends, sorry, I was just responding (sarcastically) to the question @MagicLegend posed as "How else am I supposed to get back to the original workspace I was in?" by saying/asking maybe BACK button? Yeah, use the back button all the time in Slack, works fine. You wrote "have you tried it in slack?" Tried what? Lets stay focused, this thread does not talk about going BACK to previous pages, it's an attempt to avoid opening an EXTERNAL browser :) :) I'm not sure what "Open link in Ferdium context menu option" entails/will bring/change, but will be: |
@stormy1777 Well, the context option already exists: |
@MagicLegend Oh, wow, was NOT aware of that... however, from looking/trying a bit, seems we're back to square one again, as the URLs in questions are NOT user/generated, they are NOT URLs someone is typing, rather these are in the HEADER of each message from the search result, i.e. auto-generated by Slack program/logic.. the long-rightclick does not offer open in Ferdium... Now, another interesting "plot twist".. went to Android phone which have not used a while, and there, these links JUMP OUTSIDE of Slack app, and make you even choose a browser of choice, it launches the browser then does a redirect and Launches Slack again!!! into, the new workspace :) :) so possibly the app does not have a means/ways to switch workspaces only via a Browser URL :) not sure, but that JUMP ship is there on Android/slack/app.... |
I dont understand what you mean by "long click". The context menu opens up on right-click. |
Are you performing this action within Ferdium on an android phone? We are not even targetting a mobile form-factor usage for Ferdium! |
sorry, it appears that even a short-right click opens, either way, the links in questions (header) open up a different context menu thank for links embedded in messages... |
did you mean right-click and selecting the "Open link in Ferdium" option? |
No, all the Ferdium work is on Windows 10, the android/slack was given as a comparison, how that situation is handled on an Android platform completely 100% by Slack/native app there, it seems they JUMP SHIP to a browser, then redirect into Slack app, into the new workspace :) :) funny.. all that just to switch workspace. I do not know if Ferdium can switch workspaces using a URL... maybe that's a limitation of slack, not sure... just gave that as a baseline to compare with. |
No - that's not possible in Ferdium (if you are referring to "workspace" feature of Ferdium. Are you? |
Please carefully review this post: #1007 |
no, Slack also has a "workspace", please review this post: |
can you please annotate that figure? For a person who doesn't use slack, i can't fathom which "those 3 or 4 links" you are referring to! |
ok - if you are referring to "slack workspaces", then yes, any change in the url (which can include a change in the slack workspace) can be handled by Ferdium. |
Funny... it's written in that OP, here is an improved version :) #channel-name-slk Workspace-name – May 16th View in channel please read the text description in: |
Sorry @stormy1777 - I'm unable to help any further. as I have stated earlier, I dont use slack at all. I am not able to correlate where you say "#channel-name-slk" with the appropriate part of the image that you have attached. I have requested you to annotate the image so that this correlation is visually indicated. If that's not possible, then I wont be able to help any further |
If you come on discord, we can do screen sharing and you can explain the problem, and maybe I can help with possible solution or a workaround. Conversing in this manner of a synchronous dialog in GH doesnt help to move forward |
@stormy1777 Can you please use actual screenshots? I do use Slack every day, and I don't get what you're referring to either 😄 |
@MagicLegend Please see title of ticket " IN SEARCH RESULTS" one must SEARCH in order to get results (with headers)... these headers have 3 or 4 links based on if the hit is from "same" or different slack-workspace... Here is that image/with the header region highlighted: these headers only appear to show 2 links, since they are all from SAME slack workspace.. The "view in channel" (FIELD 4 in header) only becomes visible when mouse is moved closer to one of the search hits/messages. PS: Tried to connect on discord, got lost from too much noise/links, can't figure that platform yet.. |
But when I search in Slack in Ferdi it looks like this. Is the highlighted Because you are correct that that link does not have the |
yes, that is the "view in channel", if it so happens that channel is in SAME slack-workspace, then it will open in Ferdium, otherwise, it will "jump ship" and launch an external browser.. btw, from what i see, clicking any of the 3-4 fields in the header does the same thing, either opens the message in same workspace, OR, launches a browser, if hit is from diff workspace :) :) I suspect if that "jump ship" could be intercepted and url "modified" to "feed" back into Slack, it would just show the message regardless of the workspace.... |
@stormy1777 Is this issue resolved as expected? For myself I can't seem to reproduce the original issue and all clickable fields will open inside the ferdium instance. |
I'm using v6.2.0 on win10, entered search term in slacks, it found few gits, clicked the "view in channel", it immediately opens the default browser attempting to authenticate in the browser the slack workspace, so it seems still an issue on that version.
Stormy.
On Thursday, November 10, 2022 at 09:46:20 PM GMT+2, Ricardo Cino ***@***.***> wrote:
@stormy1777 Is this issue resolved as expected? For myself I can't seem to reproduce the original issue and all clickable fields will open inside the ferdium instance.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@cino Keep in mind that this issue appears to be limited to links that go to a different Slack workspace. I personally don't use this feature, and all other links work as intended. @stormy1777 Could you please confirm that the link goes to a workspace outside of the current one? Is it correct that you are the external one in those channels? Personally I'm always the internal person, so I don't have easy access to that scenario for testing. Internally (so in a channel in our workspace, with third party people) it does work correctly, so I'm thinking this might only be if you're the external person? |
@MagicLegend Thanks for making that clear, in that case I'm moving this issue to the ferdium-recipes repository as this is not related to the app itself and more like a feature in slack. (housekeeping 🧹 ) |
Avoid duplicates
Ferdium Version
6.0.0-nightly.34
What Operating System are you using?
Windows
Operating System Version
Windows 10
What arch are you using?
x64
Last Known Working Ferdium version
No response
Expected Behavior
After a search, the resulting found items have an issue that clicking on "view in channel" or any found message should open it within the Fredium framework/window (and not externally).
Actual Behavior
After a search, the resulting found items have an issue that clicking on "view in channel" or any found message attempts to open an EXTERNAL BROWSER at the OS level, not within the framework.
Steps to reproduce
search for any message text e.g. "test"
in the resulting "hits", click "view in channel" if opens within Ferdium, that is fine, u have not reproduced the issue, if it attempts to open an EXTERNAL view, you've managed to reproduce the issue.
Debug link
No response
Screenshots
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: