Skip to content

Commit 4578691

Browse files
committed
Finalise styling except Add and Clear Canvas Button
1 parent dbef78b commit 4578691

File tree

17 files changed

+110
-79
lines changed

17 files changed

+110
-79
lines changed

README.md

Lines changed: 44 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,16 @@
5353
<li><a href="#run-exported-project">Run Exported Project</a></li>
5454
<li><a href="#contributors">Contributors</a></li>
5555
<li><a href="#roadmap">Roadmap</a></li>
56+
<li><a href="#contributing-guide">Contributing Guide</a></li>
5657
<li><a href="#license">License</a></li>
5758
</ol>
5859
</details>
5960

6061
## About
6162

62-
fflow is a frontend developer tool to create React applications in no time and with minimal effort using the simple drag and drop UI. It combines the most compelling features of Create React App, React ES6 snippets, and a beautiful user experience.
63+
fflow is a frontend developer tool to create React applications in no time and with minimal effort using the simple drag and drop UI. It combines the most compelling features of Create React App, React ES6 snippets, and a beautiful user experience.
6364

64-
👉 https://openfflow.dev
65+
👉 https://fflow.dev
6566

6667
GIFS to be inserted here and centered aligned
6768

@@ -72,8 +73,10 @@ GIFS to be inserted here and centered aligned
7273
- Light and Dark Theme based on OS Preferences and Manual Toggle
7374
- Delete Project to restart project
7475
- Clear current canvas to restart nesting in a component
75-
- Live preview and add to your JavaScript code
76-
- Export your code with webpack to instantly setup your project
76+
- Live preview in code editor with the ability to edit or add code to your JavaScript, HTML, and CSS files
77+
- File tree switch between React components
78+
- Export your code files with webpack to instantly setup your project
79+
- Terminal initializing to the either powershell.exe or zsh based on the user's OS, so the user can navigate to their exported files and launch their app
7780
- Localstorage sync
7881
- Canvas outline when HTML tag or Component is dragged over it
7982

@@ -88,8 +91,12 @@ GIFS to be inserted here and centered aligned
8891
- [Redux Toolkit](https://redux-toolkit.js.org)
8992
- [React Beautiful DnD](https://github.com/atlassian/react-beautiful-dnd)
9093
- [React Icons](https://react-icons.github.io/react-icons/)
94+
- [Xterm.js](https://xtermjs.org/)
95+
- [node-pty](https://www.npmjs.com/package/node-pty)
9196
- [TypeScript](https://www.typescriptlang.org/)
9297
- [React Modal](https://github.com/reactjs/react-modal)
98+
- [React Testing Library](https://testing-library.com/docs/react-testing-library/intro/)
99+
- [Playwright](https://playwright.dev/docs/api/class-electronapplication)
93100
<p align="right">(<a href="#top">back to top</a>)</p>
94101

95102
## Getting Started
@@ -196,13 +203,13 @@ Below is the generated directory structure of the React and Webpack application
196203

197204
```
198205
├── dist # Compiled files
199-
│ └── index.html
206+
│ └── index.html
200207
├── src # Source files
201208
│ └── App.js
202209
│ └── index.js
203210
│ └── styles.css
204211
├── test # Automated tests (alternatively `spec` or `tests`)
205-
├── webpack.config.js # Webpack configuration
212+
├── webpack.config.js # Webpack configuration
206213
├── .babelrc # Babel configuration
207214
├── .gitignore # Git ignore file
208215
├── package.json # Dependencies file
@@ -228,10 +235,12 @@ npm run start
228235
<br />
229236

230237
### Add Sass
238+
231239
Adding Sass to your exported project requires updating webpack configs and adding necessary loaders.
232240

233241
1. Install loaders for sass, `sass-loader` and `node-sass`
234242
2. Add another object to the rules in `webpack.config` with the following:
243+
235244
```javascript
236245
{
237246
test: /\.scss$/,
@@ -242,40 +251,48 @@ Adding Sass to your exported project requires updating webpack configs and addin
242251
]
243252
}
244253
```
254+
245255
3. Rename `styles.css` to `styles.scss`
246256

247257
### Add Tailwind
248-
Adding Tailwind to your exported project requires updating webpack configs, adding necessary loaders and tailwind config.
258+
259+
Adding Tailwind to your exported project requires updating webpack configs, adding necessary loaders and tailwind config.
260+
249261
1. Install tailwind as a dependency
262+
250263
```
251264
npm install tailwindcss
252265
```
253266

254267
2. Install postcss-loader and autoprefixer as development dependencies
268+
255269
```
256270
npm install -D postcss-loader autoprefixer
257271
```
272+
258273
3. Copy the following copy into `src/styles.css`
274+
259275
```css
260276
@tailwind base;
261277

262278
@tailwind components;
263279

264280
@tailwind utilities;
265281
```
282+
266283
4. Create a `postcss.config.js` file and copy the following code in
284+
267285
```javascript
268286
module.exports = {
269-
plugins: [
270-
require('tailwindcss'),
271-
require('autoprefixer')
272-
]
287+
plugins: [require('tailwindcss'), require('autoprefixer')],
273288
};
274289
```
290+
275291
5. Add `'postcss-loader'` to the css rules in `webpack.config`
276292

277293
### Change App Title
278-
This boilerplate names your project `Exported Project`. You can change the app title by inserting the app title within the `<title> </title>` tags in `index.html`.
294+
295+
This boilerplate names your project `Exported Project`. You can change the app title by inserting the app title within the `<title> </title>` tags in `index.html`.
279296

280297
<p align="right">(<a href="#top">back to top</a>)</p>
281298

@@ -300,8 +317,21 @@ Project Links: [Github](https://github.com/oslabs-beta/fflow) | [Linkedin](https
300317
- Live Editing with other collaborators
301318
- AWS hosted version
302319

303-
Read our [contributing guide](https://github.com/oslabs-beta/CONTRIBUTING.md) for more information on how to propose fixes and improvements to fflow.
320+
## Contributing Guide
321+
322+
Contributions are what make the open source community an amazing place to learn, inspire, and create. Any contributions are greatly appreciated.
323+
324+
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
325+
326+
1. Fork this repo
327+
2. Create your Feature Branch (git checkout -b yourgithubhandle/AmazingFeature)
328+
3. Commit your Changes (git commit -m 'Add some AmazingFeature')
329+
4. Push to the Branch (git push origin yourgithubhandle/AmazingFeature)
330+
5. Open a Pull Request
331+
<p align="right">(<a href="#top">back to top</a>)</p>
332+
333+
<!-- Read our [contributing guide](https://github.com/oslabs-beta/CONTRIBUTING.md) for more information on how to propose fixes and improvements to fflow. -->
304334

305335
## License
306336

307-
Licensed under MIT License © [fflow](fflow.io).
337+
Licensed under MIT License © [fflow](fflow.dev).

src/assets/splash.html

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
justify-content: center;
1111
align-items: center;
1212
margin: 0;
13-
border: 0.3rem solid transparent;
13+
/* border: 0.2rem solid transparent;
1414
border-image: linear-gradient(45deg, #971afa, #3bbde8);
15-
border-image-slice: 1;
15+
border-image-slice: 1; */
1616
}
1717

1818
h3 {
@@ -34,24 +34,6 @@
3434
width: auto;
3535
}
3636

37-
/* .loader {
38-
border: 5px solid #971afa;
39-
border-radius: 50%;
40-
border-top: 5px solid #272727;
41-
width: 40px;
42-
height: 40px;
43-
-webkit-animation: spin 1s linear infinite;
44-
Safari
45-
animation: spin 1s linear infinite;
46-
margin: auto;
47-
left: 0;
48-
right: 0;
49-
top: 0px;
50-
bottom: 0;
51-
position: fixed;
52-
border: 0.2rem solid #971afa;
53-
} */
54-
5537
/* Safari */
5638
@-webkit-keyframes spin {
5739
0% {

src/components/CanvasItem.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const CanvasItem = (props) => {
2222
return (
2323
<div className='container mx-auto px-2 md:px-4 my-4 md:mb-2'>
2424
<div
25-
id='canvas-item'
25+
// id='canvas-item'
2626
className='flex-auto items-center justify-around p-2 md:p-4 shadow-md rounded-lg relative'
2727
ref={props.provided.innerRef}
2828
{...props.provided.draggableProps}

src/components/DnD.jsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,12 @@ const DnD = () => {
4343
<>
4444
{toggleState === 'DnD' ? (
4545
<div className='dndContainer'>
46-
<p id='app-name' data-testid='app-logo' onClick={showAppCodeHandleClick}>
46+
<p
47+
// id='app-name'
48+
className='bg-clip-text text-transparent mt-3.5 text-2xl font-bold bg-gradient-to-r from-violet-700 to-cyan-400'
49+
data-testid='app-logo'
50+
onClick={showAppCodeHandleClick}
51+
>
4752
fflow.
4853
</p>
4954

@@ -56,7 +61,11 @@ const DnD = () => {
5661
</div>
5762
) : (
5863
<div className='fileTreeContainer'>
59-
<p id='app-name' onClick={showAppCodeHandleClick}>
64+
<p
65+
// id='app-name'
66+
className='bg-clip-text text-transparent mt-3.5 text-2xl font-bold bg-gradient-to-r from-violet-700 to-cyan-400'
67+
onClick={showAppCodeHandleClick}
68+
>
6069
fflow.
6170
</p>
6271
<h2 id='file-tree-heading-page2'>FOLDERS</h2>

src/components/Header.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const Header = () => {
3333
<div className='headerContainer'>
3434
{/* <!-- Modal toggle --> */}
3535
<button
36-
className='block text-white bg-indigo-700 hover:bg-indigo-800 font-medium rounded-lg text-sm px-4 py-2 text-center dark:bg-indigo-600 dark:hover:bg-indigo-700 dark:focus:ring-indigo-800'
36+
class='block text-white bg-indigo-700 hover:bg-indigo-800 font-medium rounded-lg text-sm px-4 py-2 text-center dark:bg-indigo-600 dark:hover:bg-indigo-700 dark:focus:ring-indigo-800'
3737
type='button'
3838
data-modal-toggle='popup-modal'
3939
id='clear-canvas-button'

src/components/TabContainer.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ const TabContainer = () => {
2525
<div className={tabState === 1 ? 'active-content' : 'content'}>
2626
<JSCodeEditor />
2727
</div>
28-
{/* style={{ height: '50vh', width: '10px' }} */}
2928
<div id='terminal-viewer' className={tabState === 2 ? 'active-content' : 'content'}>
3029
<TerminalView />
3130
</div>

src/components/TreeFile.jsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const FILE_ICONS = {
2323
</span>
2424
),
2525
css: (
26-
<span className='nested-files' style={{ color: 'var(--css-icon-color' }}>
26+
<span className='nested-files' style={{ backgroundColor: 'var(--css-icon-background-color)', color: 'var(--css-icon-color' }}>
2727
<DiCss3Full />
2828
</span>
2929
),
@@ -47,11 +47,13 @@ const TreeFile = ({ name, code }) => {
4747
let currentFile = useSelector((state) => state.canvas.currentFile);
4848

4949
const handleClick = () => {
50-
// console.log('filename is: ', name);
51-
dispatch(saveComponentCode());
50+
if (ext != 'css'){
51+
dispatch(saveComponentCode());
52+
53+
currentFile = name;
54+
dispatch(renderComponentCode({ name }));
55+
}
5256

53-
currentFile = name;
54-
dispatch(renderComponentCode({ name }));
5557
};
5658

5759
return (

src/components/TreeFolder.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const StyledFolder = styled.div`
1717
}
1818
1919
.folder--label:hover {
20-
background-color: var(--neutral-800);
20+
background-color: var(--file-tree-hover-color);
2121
}
2222
`;
2323

src/stylesheets/App.css

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ body {
7373
body {
7474
--backgroundColor: var(--secondaryBackgroundColor);
7575
--textColor: #ffffff;
76-
--thirdBackgroundColor: var(--secondaryBackgroundColor);
76+
/* --thirdBackgroundColor: var(--secondaryBackgroundColor); */
77+
--thirdBackgroundColor: #27272a;
7778
--errorColor: #cf6679;
7879
--navigation-panel-background-color: var(--purple-200);
7980
--navigation-panel-border-color: var(--neutral-600);
@@ -84,7 +85,11 @@ body {
8485
--canvas-file-name-color: #61dbfb;
8586
--javascript-icon-color: #f7df1e;
8687
--javascript-icon-background-color: transparent;
87-
--shadow-color: rgb(31, 31, 31);
88+
--css-icon-background-color: transparent;
89+
--css-icon-color: #0098ff;
90+
--file-tree-hover-color: var(--neutral-800);
91+
/* --shadow-color: rgb(31, 31, 31); */
92+
/* background-color: #27272a; */
8893
}
8994

9095
.theme-light {
@@ -103,7 +108,10 @@ body {
103108
--canvas-file-name-color: #4338ca;
104109
--javascript-icon-color: black;
105110
--javascript-icon-background-color: #f7df1e;
106-
--shadow-color: rgba(32, 32, 32, 0.24);
111+
--css-icon-background-color: #0098ff;
112+
--css-icon-color: white;
113+
--file-tree-hover-color: var(--neutral-300);
114+
/* --shadow-color: rgba(32, 32, 32, 0.24); */
107115
}
108116

109117
/* THEME BASED ON USER'S OS PREFERENCE */

src/stylesheets/BodyContainer.css

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.bodyContainer {
1+
.bodyContainer {
22
display: flex;
33
flex: 1 1;
44
/* gap: 30px; */
@@ -13,8 +13,12 @@
1313
#headerAndCodePreviewContainer {
1414
display: flex;
1515
flex-direction: column;
16-
/* flex: 1 1 400px; */
1716
flex: 1 1 20rem;
1817
max-width: 35%;
1918
height: 100%;
20-
}
19+
border-left: 1px solid var(--file-tree-hover-color);
20+
}
21+
22+
/* background-color: #44403c; */
23+
/* background-color: #404040;
24+
*/

0 commit comments

Comments
 (0)