vercel / vercel/hyper

Plugin url navigation iside hyper using SESSION_URL_SET action

Open
#3,095 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
44.7k
Forks
3.6k
Avg merge
21m
Merged PRs (30d)
1

Description

Issue

I'm trying to implement a simple plugin, so I followed the PLUGINS.md instruction and I got stuck with the following problem:

It seems to be that current version of hyper ignores 'SESSION_ADD_DATA' actions types.
This is my very basic plugin: suppose to open a wiki page in hyper.

exports.middleware = (store) => (next) => (action) => {
	if ('SESSION_ADD_DATA' === action.type && /wiki/.test(action.data)) {
		store.dispatch({
			type: 'SESSION_URL_SET',
			uid: store.getState().sessions.activeUid,
			url: "https://en.wikipedia.org/wiki/Wiki"
		});
		console.log('navigating to wiki, activeUid', activeUid);
	} else {
		next(action);
	}
};

Other actions actually work, example:

store.dispatch({
    type: 'NOTIFICATION_MESSAGE',
    text: "Hello There!",
    url: "https://en.wikipedia.org/wiki/Wiki",
    dismissable: tru
});

I couldn't find anything regarding "SESSION_URL_SET" action.

  • Is it intentional, or is it an issue?
  • Is there any other way to accomplish url navigation:?

Recordong

jun-20-2018 22-54-21

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read PLUGINS.md first, then trace how the SESSION_ADD_DATA and SESSION_URL_SET actions are handled in the plugin middleware. Reproduce the plugin behavior on the reported Hyper.app version and determine whether URL navigation is supported; document the supported action or alternative once the behavior is confirmed.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.