Repository navigation
Conversation
| import del from 'rollup-plugin-delete'; | ||
| import webpackStatsPlugin from 'rollup-plugin-webpack-stats'; | ||
| import svelte from 'rollup-plugin-svelte'; | ||
| import {sveltePreprocess} from 'svelte-preprocess'; |
There was a problem hiding this comment.
The cool part is that this PR finally adds support for proper dynamic components that can even be used via our native-DOM JSX solution. This will eventually help features on React views, for example:
Related:
| }), | ||
| svelte({ | ||
| compilerOptions: { | ||
| customElement: true, |
There was a problem hiding this comment.
Svelte is probably the best solution here:
- no JSX conflicts
- dedicated .svelte file that can live next to the .tsx file as
<feature-name>.svelte - custom elements support, so these components can be used in JSX as
<rgh-something count={1}/>
| if (await isFirstInstall(reason)) { | ||
| await chrome.tabs.create({ | ||
| url: 'https://github.com/refined-github/refined-github/issues/3543', | ||
| url: chrome.runtime.getURL('assets/welcome.html'), |
There was a problem hiding this comment.
The old "welcome page" is now shown as a second step.
| @@ -0,0 +1,34 @@ | |||
| /* You can have invisible/inactive links to the options page on the wiki. This feature enables them. */ | |||
There was a problem hiding this comment.
Two changes:
-
it now applies to the entire wiki, and maybe the entire repo in the future
-
it simplifies the markup while remaining invisible without extension
- [](#rgh-linkify-welcome-issue)extension’s options[](#rgh-linkify-welcome-issue) + <a name="options-page-link">extension’s options</a>
| margin-right: 0.3em; | ||
| background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" fill="gray" d="M8 5.5a2.5 2.5 0 100 5 2.5 2.5 0 000-5zM4 8a4 4 0 118 0 4 4 0 01-8 0z"></path></svg>'); | ||
| background-size: contain; | ||
| } |
There was a problem hiding this comment.
Styles come from the options page. Eventually I might componentize this.
| @@ -0,0 +1,126 @@ | |||
| <svelte:options customElement='rgh-welcome' /> | |||
There was a problem hiding this comment.
This file is a bit messy. Suggestions on how to make it more "svelte-like" very much welcome.
| <svelte:options customElement='rgh-welcome' /> | ||
|
|
||
| <script lang='ts'> | ||
| import './welcome.css'; |
There was a problem hiding this comment.
One thing I skipped (for now?) is the use of <style> tags because I can't format the CSS in it without also formatting the JS:
JS formatting is taken care of by eslint.
Maybe one day with:
|
Looks awesome!! I would love to test it, I will ty it later and get back to you. |
|
Maybe I missed something but I couldn't find information on this welcome/token page nor the "More info"-linked Wiki page about what permissions the token needs. |
| <!-- svelte-ignore a11y-click-events-have-key-events --> | ||
| <li class:valid={stepValid >= 2} class:visible={stepVisible >= 2} class='will-show' on:click={showThirdStep}> | ||
| <a | ||
| href='https://github.com/settings/tokens/new?description=Refined%20GitHub&scopes=repo,read:project' |
There was a problem hiding this comment.
@djhoese thanks for the comment!
The link should already pre-select the minimal scopes we expect, see the link here. Does it not happen for you? What's your browser? This is what you should see:
There was a problem hiding this comment.
Ah, that would do it. I didn't click that link. I went to the token page myself. Makes sense.
There was a problem hiding this comment.
I'll see if I can add that information in the wiki as well though, and/or I'll bring out the same UI we have in the options page.




I think people install the extension and don't realize that it asks for a token. This is somewhat understandable, at least until they open the options page (if ever) or look at the console. More likely they will just complain that the UI doesn't work the way they expect it to.
A second issue is that in Safari they will be shown the Welcome Page but Refined GitHub is not loaded yet because Safari does not automatically grant access on install. This UI merges both needs into one step.
Safari
safari.mov
Chrome + error demo
Screen.Recording.3.mov
Safari iOS
iOS.mov