-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(feature) Zap Editor Styling and Instructions (#11)
Co-authored-by: Zach Waterfield <[email protected]>
- Loading branch information
1 parent
213fdd1
commit 271a61a
Showing
11 changed files
with
194 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
# Contributing | ||
|
||
Suggestions and pull requests are highly encouraged! Have a look at the [open issues](https://github.com/zlwaterfield/refined-zapier/issues). | ||
|
||
## Notions | ||
|
||
- You will need to be familiar with [npm](https://docs.npmjs.com/getting-started/) and TypeScript to build this extension. | ||
- The extension can be loaded into Chrome or Firefox manually ([See notes below](#loading-into-the-browser)) | ||
- [JSX](https://reactjs.org/docs/introducing-jsx.html) is used to create DOM elements. | ||
- All the [latest DOM APIs](https://github.com/WebReflection/dom4#features) and JavaScript features are available because the extension only has to work in the latest Chrome and Firefox. 🎉 | ||
- Each JavaScript feature lives in its own file under [`source/features`](https://github.com/sindresorhus/refined-github/tree/main/source/features) and it's imported in [`source/refined-zapier.ts`](https://github.com/zlwaterfield/refined-zapier/blob/main/source/refined-zapier.ts). | ||
- See what a feature [looks like]https://github.com/zlwaterfield/refined-zapier/blob/main/source/features/improved-zap-list-styling.tsx). | ||
|
||
|
||
## `features.add` | ||
|
||
The simplest usage of `feature.add` is the following. This will be run instantly on all page-loads: | ||
|
||
```js | ||
import * as pageDetect from 'github-url-detection'; | ||
import features from '.'; | ||
|
||
function init() { | ||
console.log('✨'); | ||
} | ||
|
||
void features.add(__filebasename, { | ||
include: [ | ||
isZaps | ||
], | ||
awaitDomReady: false, | ||
init | ||
}); | ||
``` | ||
|
||
Here's an example using `feature.add` options: | ||
|
||
```ts | ||
import './improved-sidebar-styling.css'; | ||
import features from '.'; | ||
import {isDashboard, isMyZaps, isZapHistory, isZaps} from '../helpers/page-detect'; | ||
|
||
async function init(): Promise<false | void> { | ||
// This is all done via styling | ||
} | ||
|
||
void features.add(__filebasename, { | ||
include: [ | ||
isZaps, | ||
isMyZaps, | ||
isDashboard, | ||
isZapHistory | ||
], | ||
init | ||
}); | ||
|
||
``` | ||
|
||
## Requirements | ||
|
||
[Node.js](https://nodejs.org/en/download/) version 15 or later is required. | ||
|
||
## Workflow | ||
|
||
First clone: | ||
|
||
```sh | ||
git clone https://github.com/zlwaterfield/refined-zapier | ||
cd refined-zapier | ||
yarn install | ||
``` | ||
|
||
When working on the extension or checking out branches, use this to have it constantly build your changes: | ||
|
||
```sh | ||
yarn watch # Listen to file changes and automatically rebuild | ||
``` | ||
|
||
Then load or reload it into the browser to see the changes. | ||
|
||
## Loading into the browser | ||
|
||
Once built, load it in the browser of your choice with [web-ext](https://github.com/mozilla/web-ext): | ||
|
||
```sh | ||
npx web-ext run --target=chromium # Open extension in Chrome | ||
``` | ||
|
||
```sh | ||
npx web-ext run # Open extension in Firefox | ||
``` | ||
|
||
Or you can [load it manually in Chrome](https://www.smashingmagazine.com/2017/04/browser-extension-edge-chrome-firefox-opera-brave-vivaldi/#google-chrome-opera-vivaldi) or [Firefox](https://www.smashingmagazine.com/2017/04/browser-extension-edge-chrome-firefox-opera-brave-vivaldi/#mozilla-firefox). |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
|
||
.flow-container__editor { | ||
background-color: white; | ||
} | ||
|
||
div[class*='flow-sidebar__beta-timeline']{ | ||
width: 1000px; | ||
margin: 0 auto; | ||
border: 2px solid #E3E9ED; | ||
border-radius: 16px; | ||
box-sizing: border-box; | ||
padding-top: 25px; | ||
padding-bottom: 25px; | ||
} | ||
|
||
|
||
div[class*='flow-detail-steps']{ | ||
font-family: Poppins, sans-serif !important; | ||
padding-right: 25px; | ||
padding-left: 25px; | ||
position: relative; | ||
width: 100%; | ||
} | ||
|
||
|
||
div[class*='css-wra4y2'] { | ||
background-color: white; | ||
} | ||
|
||
|
||
/* Not solved */ | ||
div[class*='flow-container__app-bar'] > button[aria-label="share this zap"] { | ||
background-color: black !important; | ||
} | ||
|
||
.button[aria-label="share this zap"]{ | ||
background-color: black; | ||
} | ||
|
||
div[class*='flow-detail-steps'] > span[class*="Text--subtitle800--black"]{ | ||
font-family: Poppins, sans-serif !important; | ||
font-size: 20px !important; | ||
font-weight: 700 !important; | ||
line-height: 25px !important; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import './improved-zap-editor-styling.css'; | ||
import features from '.'; | ||
import {isZapEditor} from '../helpers/page-detect'; | ||
|
||
async function init(): Promise<false | void> { | ||
// This is all done via styling | ||
} | ||
|
||
void features.add(__filebasename, { | ||
include: [ | ||
isZapEditor | ||
], | ||
init | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters