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

Fix #139: also fix broken properties display #147

Merged
merged 11 commits into from
Mar 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion config/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const buildDir = 'docs'
const build = {
entryPoints: [entry],
bundle: true,
minify: true,
minify: false,
// Splitting
// Entry points (our src/index.jsx) are currently not named with
// cache-busting segments, like index-x84nfi.js, so we should be
Expand Down
Binary file added docs/Schependomlaan.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/Schependomlaan.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 12 additions & 1 deletion docs/index.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/index.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

165,625 changes: 162,152 additions & 3,473 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.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "buildrs",
"version": "1.0.0-r256",
"version": "1.0.0-r264",
"main": "src/index.jsx",
"homepage": "https://github.com/buildrs/Share",
"bugs": {
Expand Down
Binary file added public/Schependomlaan.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/Schependomlaan.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 17 additions & 11 deletions src/Components/AboutControl.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import GitHubIcon from '../assets/2D_Icons/GitHub.svg'

/**
* Button to toggle About panel on and off
* @param {Number} offsetTop offset tree element
* @param {string} installPrefix For use in static asset links.
* @return {Object} The AboutControl react component.
*/
export default function AboutControl({offsetTop}) {
export default function AboutControl({installPrefix}) {
const [isDialogDisplayed, setIsDialogDisplayed] =
useState(Privacy.getCookieBoolean({
component: 'about',
Expand All @@ -37,7 +37,8 @@ export default function AboutControl({offsetTop}) {
setIsDialogDisplayed={() => {
setIsDialogDisplayed(false)
Privacy.setCookieBoolean({component: 'about', name: 'isFirstTime', value: false})
}}/>
}}
installPrefix={installPrefix}/>
}/>
)
}
Expand All @@ -47,25 +48,26 @@ export default function AboutControl({offsetTop}) {
* The AboutDialog component
* @param {boolean} isDialogDisplayed
* @param {function} setIsDialogDisplayed
* @param {string} installPrefix node
* @return {Component} React component
*/
function AboutDialog({isDialogDisplayed, setIsDialogDisplayed}) {
function AboutDialog({isDialogDisplayed, setIsDialogDisplayed, installPrefix}) {
return (
<Dialog
icon={<LogoB/>}
headerText='BLDRS'
isDialogDisplayed={isDialogDisplayed}
setIsDialogDisplayed={setIsDialogDisplayed}
content={<AboutContent/>}/>)
content={<AboutContent installPrefix={installPrefix}/>}/>)
}


/**
* The content portion of the AboutDialog
* @param {Object} clazzes node
* @param {string} installPrefix node
* @return {Object} React component
*/
function AboutContent({clazzes}) {
function AboutContent({installPrefix}) {
const classes = useStyles()
const marks = [
{value: 0, label: 'Functional', info: 'Theme, UI state, cookie preference'},
Expand Down Expand Up @@ -97,12 +99,16 @@ function AboutContent({clazzes}) {
</ul>
<Typography variant='h5' color='info'>Highlighted Projects:</Typography>
<div className = {classes.demoContainer}>
<a href='https://bldrs.ai/share/v/gh/Swiss-Property-AG/Portfolio/main/KNIK.ifc'>
<img alt="Tinyhouse" src="/Tinyhouse.png" className={classes.demo}/>
{/* eslint-disable-next-line */}
<a href={`${installPrefix}/share/v/gh/Swiss-Property-AG/Portfolio/main/KNIK.ifc#c:-12.84,3.53,9.64,-5.33,2.61,1.71`}>
<img alt="Tinyhouse" src={`${installPrefix}/Tinyhouse.png`} className={classes.demo}/>
</a>
{/* eslint-disable-next-line */}
<a href='https://bldrs.ai/share/v/gh/IFCjs/test-ifc-files/main/Schependomlaan/IFC%20Schependomlaan.ifc'>
<img alt="Schependomlaan" src="/Schependomlaan.png" className={classes.demo}/>
<a href={`${installPrefix}/share/v/gh/IFCjs/test-ifc-files/main/Schependomlaan/IFC%20Schependomlaan.ifc#c:-19.95,17.97,25.31,4.52,0.65,1.24`}>
<img
alt="Schependomlaan"
src={`${installPrefix}/Schependomlaan.png`}
className={classes.demo}/>
</a>
</div>
<div className={classes.settings}>
Expand Down
6 changes: 4 additions & 2 deletions src/Components/BaseGroup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ import OpenIcon from '../assets/2D_Icons/Open.svg'

/**
* Base group contains Settings, ModelUpload, About
* @param {string} installPrefix Serving prefix for the app, for use in
* constructing static asset links.
* @param {Object} fileOpen ItemPanel component
* @return {Object} React component
*/
export default function BaseGroup({fileOpen}) {
export default function BaseGroup({installPrefix, fileOpen}) {
const classes = useStyles()
return (
<div className={classes.root}>
Expand All @@ -19,7 +21,7 @@ export default function BaseGroup({fileOpen}) {
icon={<OpenIcon/>}
onClick={fileOpen}
placement='top'/>
<AboutControl/>
<AboutControl installPrefix={installPrefix}/>
</div>
)
}
Expand Down
2 changes: 1 addition & 1 deletion src/Containers/CadView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ export default function CadView({
isOpenState={isItemPanelOpenState}/>}/>}
</div>
<div className={isItemPanelOpen ? classes.baseGroupOpen : classes.baseGroup}>
<BaseGroup fileOpen={loadLocalFile}/>
<BaseGroup installPrefix={installPrefix} fileOpen={loadLocalFile}/>
</div>
{alert}
</div>
Expand Down