Skip to content
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

Eslint fixes #101

Merged
merged 63 commits into from
Feb 15, 2022
Merged
Show file tree
Hide file tree
Changes from 46 commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
311628f
new build;
Dec 8, 2021
ddd8376
add build
Dec 9, 2021
e6b1c13
another build
Dec 9, 2021
2d9e720
resolve conflicts
Dec 9, 2021
8994713
new build
Dec 9, 2021
5f2587f
Merge remote-tracking branch 'upstream/main'
Dec 10, 2021
84e44b1
Merge branch 'main' of https://github.com/buildrs/Share
Dec 13, 2021
df47657
Merge branch 'main' of https://github.com/buildrs/Share
Dec 14, 2021
1f7a7e3
merged yarn test
Dec 14, 2021
afb08f5
correct build
Dec 14, 2021
6990702
pull form upstream
Dec 15, 2021
200f4d4
properties update
Jan 5, 2022
d676807
Merge branch 'main' of https://github.com/buildrs/Share
Jan 27, 2022
662c050
Merge branch 'main' of https://github.com/buildrs/Share
Jan 29, 2022
28b76ee
Merge branch 'main' of https://github.com/buildrs/Share
Feb 3, 2022
e17b1dd
update
Feb 8, 2022
d03465f
Merge branch 'main' of https://github.com/buildrs/Share
Feb 9, 2022
21b9f33
Merge branch 'main' of https://github.com/buildrs/Share
Feb 10, 2022
a834a69
assets
Feb 10, 2022
754222c
Merge pull request #2 from OlegMoshkovich/about_clone
OlegMoshkovich Feb 10, 2022
15d4b49
build
Feb 10, 2022
335a612
build
Feb 10, 2022
be0cdb3
change the logo
Feb 10, 2022
3c7445a
add abstracted logo
Feb 10, 2022
bafc605
added 3D theme
Feb 11, 2022
ac90bed
new build
Feb 11, 2022
667b6b2
add the icons
Feb 11, 2022
3c0f433
update icons
Feb 11, 2022
1005fbd
pass tests
Feb 11, 2022
ea17b3d
tst description
Feb 11, 2022
0a84833
delete icons
Feb 11, 2022
ad3f62c
fix mising icons + format
Feb 11, 2022
d6ebeb6
Merge branch 'main' of https://github.com/buildrs/Share
Feb 11, 2022
5ac2e61
resolve errors
Feb 11, 2022
067d00d
fix docs in search, ifc and tree utils
Feb 12, 2022
d0d0076
fix react component etc
Feb 12, 2022
5a97648
fix utils
Feb 12, 2022
ac75d2b
fix the comments
Feb 14, 2022
7673d41
fix spacing
Feb 14, 2022
b24e1c3
fix the tests
Feb 14, 2022
44b1d76
more fixes
Feb 14, 2022
1cc2a96
add export default
Feb 14, 2022
24da470
fix lint errors
Feb 14, 2022
0008a95
fix ifc errors
Feb 14, 2022
e40b572
add the errors
Feb 14, 2022
da44185
es lint warnings
Feb 14, 2022
172620e
fix
Feb 14, 2022
0124a3d
buid
Feb 14, 2022
59a6f9f
fix errors in the icon group
Feb 14, 2022
61b9067
console fix
Feb 14, 2022
b27f1eb
build
Feb 14, 2022
710a1b3
build
Feb 14, 2022
4260848
Merge branch 'main' of https://github.com/buildrs/Share
Feb 15, 2022
243d49a
resolve errors
Feb 11, 2022
5bf1115
Merge pull request #3 from OlegMoshkovich/es-lint
OlegMoshkovich Feb 15, 2022
7718f85
merge fixes
Feb 15, 2022
34095f8
fix the lint errors
Feb 15, 2022
0182d6d
add yarn lint rules
Feb 15, 2022
f128be5
resolved conflicts from main
Feb 15, 2022
b95442b
add styles to item properties
Feb 15, 2022
d4a5596
fix comments
Feb 15, 2022
95ed298
new build
Feb 15, 2022
b19c537
remove es ignore
Feb 15, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
169 changes: 86 additions & 83 deletions docs/index.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/index.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "buildrs",
"version": "0.1.0-r265",
"version": "0.1.0-r274",
"main": "src/index.jsx",
"homepage": "https://github.com/buildrs/Share",
"scripts": {
Expand All @@ -9,6 +9,7 @@
"copy-web-asm": "cp node_modules/web-ifc/web-ifc.wasm public/static/js",
"build": "yarn copy-web-asm && yarn clean && yarn new-version && node config/build.js",
"serve": "yarn build && node config/serve.js",
"lint": "yarn eslint `find src -name '*.jsx'` `find src -name '*.js'`",
"test": "jest"
},
"dependencies": {
Expand Down
187 changes: 104 additions & 83 deletions src/Components/AboutPanel.jsx
Original file line number Diff line number Diff line change
@@ -1,117 +1,138 @@
import React from 'react'
import Paper from '@mui/material/Paper'
import Typography from '@mui/material/Typography'
import { makeStyles } from '@mui/styles'
import {makeStyles} from '@mui/styles'
import About from '../assets/3D/attention.svg'


export function AboutControl ({offsetTop}) {
const [open, setOpen]=React.useState(true);
const classes = useStyles();
/**
* Button to toggle About panel on and off
* @param {Number} offsetTop offset tree element
* @return {Object} The AboutControl react component.
*/
export default function AboutControl({offsetTop}) {
const [open, setOpen]=React.useState(true)
const classes = useStyles()
return (
<div >
<Typography className = {classes.about} onClick={() => {setOpen(!open)}}>About</Typography>
{open && <AboutPanel openToggle={()=>{setOpen(!open)}} offsetTop={offsetTop}/>}
</div>);
};
<Typography className = {classes.about} onClick={() => {
setOpen(!open)
}}>About</Typography>
{open && <AboutPanel openToggle={()=>{
setOpen(!open)
}} offsetTop={offsetTop}/>}
</div>)
}

function AboutPanel ({openToggle, offsetTop}) {
const classes = useStyles({offsetTop:offsetTop});
/**
* About Panel component
* @param {string} offset tree element
* @return {Component} componet
*/
function AboutPanel({openToggle, offsetTop}) {
const classes = useStyles({offsetTop: offsetTop})

return (
<div className = {classes.container} onClick = {openToggle}>
<Paper elevation={3} className={classes.panel}>
<h1 style = {{width:'100%', display:'flex', justifyContent:'center', paddingTop:'10px'}}><About/></h1>
<p><strong>BLDRS</strong> is a collaborative integration environment for IFCs 🙂</p>
<p> We are open source 🌱 Please visit our repository:&nbsp;
<a href = {'https://github.com/buildrs/Share'} target="_new">github.com/buildrs/Share</a></p>
<p>We are just getting started, stay tuned for the upcoming MVP release 🚀</p>
<h2 >Features:</h2>
<ul>
<li>Upload IFC file</li>
<li>Share IFC model with the URL address</li>
<li>Select IFC element</li>
<li>Obtain IFC element properties </li>
</ul>
</Paper>
</div>
);
};
<div className = {classes.container}
role = "none"
onClick = {openToggle}
onKeyDown={openToggle} >
<Paper elevation={3} className={classes.panel}>
<h1 className = {classes.title}><About/></h1>
<p><strong>BLDRS</strong> is a collaborative integration environment for IFCs 🙂</p>
<p> We are open source 🌱 Please visit our repository:&nbsp;
<a href = {'https://github.com/buildrs/Share'} target="_new">
github.com/buildrs/Share
</a>
</p>
<p>We are just getting started, stay tuned for the upcoming MVP release 🚀</p>
<h2 >Features:</h2>
<ul>
<li>Upload IFC file</li>
<li>Share IFC model with the URL address</li>
<li>Select IFC element</li>
<li>Obtain IFC element properties </li>
</ul>
</Paper>
</div>
)
}

const useStyles = makeStyles({
container:{
container: {
position: 'absolute',
top:'0px',
left:'0px',
width:'100%',
height:'100vh',
display:'flex',
justifyContent:'center',
top: '0px',
left: '0px',
width: '100%',
height: '100vh',
display: 'flex',
justifyContent: 'center',
},
title: {
width: '100%',
display: 'flex',
justifyContent: 'center',
paddingTop: '10px'},
panel: {
position:'relative',
top: (props) => props.offsetTop,
width: '320px',
height:'380px',
fontFamily: 'Helvetica',
padding: '1em 1em',
'position': 'relative',
'top': (props) => props.offsetTop,
'width': '320px',
'height': '380px',
'fontFamily': 'Helvetica',
'padding': '1em 1em',
'@media (max-width: 900px)': {
width: '84%',
height:'400px',
height: '400px',
},
"& h1, & h2": {
'& h1, & h2': {
color: '#696969',
fontWeight:200
fontWeight: 200,
},
"& h1": {
'& h1': {
marginTop: 0,
fontWeight:200
fontWeight: 200,
},
"& h2": {
textAlign:'center',
fontSize:'20px'
'& h2': {
textAlign: 'center',
fontSize: '20px',
},
"& p": {
fontWeight:200,
textAlign:'center',
lineHeight:'19px',
'& p': {
'fontWeight': 200,
'textAlign': 'center',
'lineHeight': '19px',
'@media (max-width: 900px)': {
lineHeight:'22px'
},
lineHeight: '22px',
},
},
"& li": {
fontWeight:200,
'& li': {
fontWeight: 200,
},
"& a": {
color:'lime',
backgroundColor:'#848484',
paddingLeft:'4px',
paddingRight:'4px',
paddingBottom:'2px',
cornerRadius:'2px'
'& a': {
color: 'lime',
backgroundColor: '#848484',
paddingLeft: '4px',
paddingRight: '4px',
paddingBottom: '2px',
cornerRadius: '2px',
},

},

about:{
cursor:'pointer',
paddingRight:'10px',
about: {
cursor: 'pointer',
paddingRight: '10px',
},
icon:{
width:'30px',
height:'30px',
cursor:'pointer'
icon: {
width: '30px',
height: '30px',
cursor: 'pointer',
},
closeButton: {
float:'right',
cursor:'pointer',
marginTop:'8px',
"& svg": {
width:'24px',
height:'20px',
'float': 'right',
'cursor': 'pointer',
'marginTop': '8px',
'& svg': {
width: '24px',
height: '20px',
},
}
});

},
})


7 changes: 4 additions & 3 deletions src/Components/GuidePanel.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import {makeStyles} from '@mui/styles'
OlegMoshkovich marked this conversation as resolved.
Show resolved Hide resolved
import IconButton from '@mui/material/IconButton'
import Paper from '@mui/material/Paper'
import Close from '../assets/3D/clear.svg'
import Question from '../assets/3D/help.svg'
Expand Down Expand Up @@ -62,13 +63,13 @@ const QuestionIcon = ({offsetTop}) => {
const [open, setOpen]=React.useState(false)
const classes = useStyles()
return (
<div onClick={() => {
<IconButton onClick={() => {
setOpen(!open)
}}>
<Question className = {classes.icon}/> {open && <GuidePanel openToggle={()=>{
setOpen(!open)
}} offsetTop={offsetTop}/>}
</div>)
</IconButton>)
}


Expand All @@ -78,7 +79,7 @@ const GuidePanel = ({openToggle, offsetTop}) => {
return (
<div className = {classes.container}>
<Paper elevation={3} className={classes.panel}>
<div className = {classes.closeButton} onClick = {openToggle}><Close/></div>
<div className = {classes.closeButton}><Close onClick = {openToggle}/></div>
<h1>Guide</h1>
<p>To select an element:</p>
<ul>
Expand Down
6 changes: 4 additions & 2 deletions src/Components/ItemPropertiesDrawer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,11 @@ const ItemPropertiesDrawer = ({
classes={{paper: classes.drawerPaper}}
>
<div className ={classes.drawerContainer}>
<div className={classes.headerWrapper} onClick={onClose}>
<div className={classes.headerWrapper} >
<div className={classes.title}>{title}</div>
<div className = {classes.closeContainer}><Close className={classes.close} /></div>
<div className = {classes.closeContainer}>
<Close className={classes.close} onClick={onClose}/>
</div>
</div>

<div className = {classes.contentContainer}>
Expand Down
67 changes: 0 additions & 67 deletions src/Components/MobileTabs.js

This file was deleted.

1 change: 1 addition & 0 deletions src/Components/NavPanel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export default function NavPanel({
setExpandedElements(parts)
}
}
// eslint-disable-next-line
OlegMoshkovich marked this conversation as resolved.
Show resolved Hide resolved
}, [location])

const classes = useStyles()
Expand Down