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

VYZN: (feature) hide/unhide and temporary isolate IFC elements #617

Merged
merged 44 commits into from Mar 24, 2023

Conversation

Ibrahim5aad
Copy link
Collaborator

@Ibrahim5aad Ibrahim5aad commented Feb 19, 2023

This PR provides the following features:

  1. Hiding and unhiding individual elements (including spatial aggregations/containers like IfcBuilding, IfcBuildingStorey, etc) (by the navigation tree, or keyboard shortcut: "H" when there is a selection you want to hide)
  2. Unhide all hidden elements: keyboard shortcut "U"
  3. Toggle reveal hidden elements: keyboard shortcut "R"
  4. Toggle temporary Isolation mode: isolate selected elements in scene: keyboard shortcut "I"

This PR closes #384.

Overview

IFC.Hide.and.Isolation.Features.2.mp4

Ibrahim Saad added 25 commits January 15, 2023 22:45
@netlify
Copy link

netlify bot commented Feb 19, 2023

Deploy Preview for bldrs-share ready!

Name Link
🔨 Latest commit c58628e
🔍 Latest deploy log https://app.netlify.com/sites/bldrs-share/deploys/641debc2e8ef7c00080462e4
😎 Deploy Preview https://deploy-preview-617--bldrs-share.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@Ibrahim5aad
Copy link
Collaborator Author

Hey @pablo-mayrgundter, this is ready for review, but I'm not sure why I can't request a review.

Copy link
Member

@pablo-mayrgundter pablo-mayrgundter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really cool. Thank you!

Please add:

  • unit test for IfcIsolator, with expects on mock ifcviewer
  • cypress test for clicking on a hide elt and validating the icon switches from on to off. This is very shallow but better than nothing.

Would be nice if there were in-scene expects.. any ideas there? Even without the

@Ibrahim5aad
Copy link
Collaborator Author

@pablo-mayrgundter Yeah I was having the same thoughts about what is the proper tests for those scene-dependent pieces of code.

@Ibrahim5aad
Copy link
Collaborator Author

@pablo-mayrgundter Hey Pablo, I added some tests for the isolator. Also this "Place Marks" feature broke the other post processing effects (one of them I implemented for the temp. isolation mode), I fixed this already, and made sure it works for the highlighter, isolator and the place-mark feature.

@pablo-mayrgundter
Copy link
Member

@pablo-mayrgundter Hey Pablo, I added some tests for the isolator. Also this "Place Marks" feature broke the other post processing effects (one of them I implemented for the temp. isolation mode), I fixed this already, and made sure it works for the highlighter, isolator and the place-mark feature.

Ah, sorry about that. @ronplaymeta could you please review the break+fix in this PR?

@OlegMoshkovich
Copy link
Member

Hi @Ibrahim5aad can you please align the icons on the right?
Also, if several elements are hidden and the theme changes from night to day, the icons still show the hidden state but elements show up.

image

@Ibrahim5aad
Copy link
Collaborator Author

Hi @Ibrahim5aad can you please align the icons on the right? Also, if several elements are hidden and the theme changes from night to day, the icons still show the hidden state but elements show up.

image

Hi @OlegMoshkovich , those should be fixed now.

@OlegMoshkovich
Copy link
Member

@Ibrahim5aad looks great!
thank you so much for the fixes.
@pablo-mayrgundter PTAL

@OlegMoshkovich
Copy link
Member

@Ibrahim5aad can you please adjust opacity of the eye icon to 50 percent - super minor change, it will make the icons less prominent compare to the rest of the ui.

@OlegMoshkovich
Copy link
Member

Also, please resolve the conflicts.

@pablo-mayrgundter
Copy link
Member

Hey guys, I'm going to take a look and then merge if there's nothing major. @OlegMoshkovich I'll take the opacity thing.. can save us some back-and-forth.

Signed-off-by: Pablo Mayrgundter <pablo.mayrgundter@gmail.com>
@OlegMoshkovich OlegMoshkovich merged commit ca07d4d into bldrs-ai:main Mar 24, 2023
6 checks passed
@Ibrahim5aad
Copy link
Collaborator Author

Thanks @pablo-mayrgundter , and sorry if I'm not responsive right away, It've been some busy days.

oogali pushed a commit to oo-bldrs/Share that referenced this pull request Mar 27, 2023
…-ai#617)

* feat: custom viewer api

* subset list to dict

* remove log statement

* fix missing __getIFCViewerAPIMockSingleton

* pickByID new implementation

* fix: remove resetSelection guard to fix key down callback function lost state

* fix: reset selection guard back to fix failing tests and call the from the call back func changed

* subsets revisited

* unhide all hidden elements

* feature: ifc isolator component, incapsulates hide and isolate operations

* fix: ids loaded from meshes to insure having visual props

* fix: remove unused ifc classes imports

* fix: get express ids from model mesh  attributes for better performance

* fix: reset reveal upon unhide

* fix: turn off reveal on unhide all

* feat: hide/unhide icons in nav tree for spatial structures and root aggregators

* fix: failing unit tests

* linter fixes

* fix: reveal hidden elements material's depthTest

* re-evaluate reveal subset if on when hiding again

* fix: ifc viewer highlighter

* remove unused imports

* fix: disable hide icons on temp isolation mode

* reflect isoaltor status to selected elements store

* unit test for hide element by the tree icons

* toggle hide icon e2e test

* fix post processor

* fix failing cadview tests

* fix: placemarks broke the other post processing effects

* fix: remove singleton post-processor

* fix: space typo

* fix: disable lint error

* fix: maintain hidden elements when viewer changes

* fix: align hide icons to right

---------

Signed-off-by: Pablo Mayrgundter <pablo.mayrgundter@gmail.com>
Co-authored-by: Ibrahim Saad <ibrahim.saad@xbim.net>
Co-authored-by: OlegMoshkovich <oleg.mosh@gmail.com>
Co-authored-by: Pablo Mayrgundter <pablo.mayrgundter@gmail.com>
oo-bldrs added a commit that referenced this pull request Mar 28, 2023
* Disallow use of console logging, alerts, and debugging

* Calling unimplemented methods should raise an exception

* Allow console logging for logic that only occurs in development and testing

* Allow console logging for CLI/build tooling

* Remove unnecessary console logging

* Convert console logging to debug statements

* Fix path for utils import

* File access dialog (#640)

* add drop downs to the open dialog

* pulled selector into a separate component

* clean up

* add the tests

* style the open dialog

* add test for files

* address comments

* clean up

* updatee tests

* clean up logs

* subtract ...

* test

* and at symbol to the orgname

* add at symbol

* populate js doc description

* simplify selection logic

* revert the change

* change properties to include name

* fix the navigate path

* clean up

* simplify the navigate path

* Clean github functions (#672)

* clean github functions

* add unit tests

* revert whitespace, check missed params in api handlers

* revert whitespaces of content in api handler

* few style chnages

---------

Co-authored-by: Ron <rondoor124@gmail.com>

* Update severity levels for particular debug calls

* Replace storybook with react-cosmos (#609)

* Replace storybook with react-cosmos.  Mostly working.

* Replace storybook with react-cosmos.  Mostly working.

* yarn build: both serve and cosmos.  Remove broken stories.

* yarn build-cosmos: clean build before build.  Obey NODE_ENV production or development settings.

* cosmos.webpack.js: use root serving path for standalone local dev but under /sb for prod.

* cosmos.webpack.js: more testing to put output under /sb in prod.

* Remove debug logging

* Remove HtmlPlugin from React Cosmos webpack config per random advice on internet.

* Testing cosmos build locations.

* Testing cosmos build locations 2.

* align rectangular button and change the order of notes (#683)

* VYZN: (feature) hide/unhide and temporary isolate IFC elements (#617)

* feat: custom viewer api

* subset list to dict

* remove log statement

* fix missing __getIFCViewerAPIMockSingleton

* pickByID new implementation

* fix: remove resetSelection guard to fix key down callback function lost state

* fix: reset selection guard back to fix failing tests and call the from the call back func changed

* subsets revisited

* unhide all hidden elements

* feature: ifc isolator component, incapsulates hide and isolate operations

* fix: ids loaded from meshes to insure having visual props

* fix: remove unused ifc classes imports

* fix: get express ids from model mesh  attributes for better performance

* fix: reset reveal upon unhide

* fix: turn off reveal on unhide all

* feat: hide/unhide icons in nav tree for spatial structures and root aggregators

* fix: failing unit tests

* linter fixes

* fix: reveal hidden elements material's depthTest

* re-evaluate reveal subset if on when hiding again

* fix: ifc viewer highlighter

* remove unused imports

* fix: disable hide icons on temp isolation mode

* reflect isoaltor status to selected elements store

* unit test for hide element by the tree icons

* toggle hide icon e2e test

* fix post processor

* fix failing cadview tests

* fix: placemarks broke the other post processing effects

* fix: remove singleton post-processor

* fix: space typo

* fix: disable lint error

* fix: maintain hidden elements when viewer changes

* fix: align hide icons to right

---------

Signed-off-by: Pablo Mayrgundter <pablo.mayrgundter@gmail.com>
Co-authored-by: Ibrahim Saad <ibrahim.saad@xbim.net>
Co-authored-by: OlegMoshkovich <oleg.mosh@gmail.com>
Co-authored-by: Pablo Mayrgundter <pablo.mayrgundter@gmail.com>

* Upgrade packages.  Fixup mui styling change to Dialog button.  Add fixtures for Dialog, About and fix ControlButton. (#682)

Signed-off-by: Pablo Mayrgundter <pablo.mayrgundter@gmail.com>

* Suppress eslint violation per Pablo (#688)

* Remove no-op ESLint rule control

---------

Signed-off-by: Pablo Mayrgundter <pablo.mayrgundter@gmail.com>
Co-authored-by: OlegMoshkovich <oleg.mosh@gmail.com>
Co-authored-by: Ron <rondoor124@gmail.com>
Co-authored-by: Pablo Mayrgundter <pablo.mayrgundter@gmail.com>
Co-authored-by: Ibrahim Saad <ibrahim.saad@xbim.net>
OlegMoshkovich added a commit to OlegMoshkovich/Share that referenced this pull request Mar 31, 2023
* Disallow use of console logging, alerts, and debugging

* Calling unimplemented methods should raise an exception

* Allow console logging for logic that only occurs in development and testing

* Allow console logging for CLI/build tooling

* Remove unnecessary console logging

* Convert console logging to debug statements

* Fix path for utils import

* File access dialog (bldrs-ai#640)

* add drop downs to the open dialog

* pulled selector into a separate component

* clean up

* add the tests

* style the open dialog

* add test for files

* address comments

* clean up

* updatee tests

* clean up logs

* subtract ...

* test

* and at symbol to the orgname

* add at symbol

* populate js doc description

* simplify selection logic

* revert the change

* change properties to include name

* fix the navigate path

* clean up

* simplify the navigate path

* Clean github functions (bldrs-ai#672)

* clean github functions

* add unit tests

* revert whitespace, check missed params in api handlers

* revert whitespaces of content in api handler

* few style chnages

---------

Co-authored-by: Ron <rondoor124@gmail.com>

* Update severity levels for particular debug calls

* Replace storybook with react-cosmos (bldrs-ai#609)

* Replace storybook with react-cosmos.  Mostly working.

* Replace storybook with react-cosmos.  Mostly working.

* yarn build: both serve and cosmos.  Remove broken stories.

* yarn build-cosmos: clean build before build.  Obey NODE_ENV production or development settings.

* cosmos.webpack.js: use root serving path for standalone local dev but under /sb for prod.

* cosmos.webpack.js: more testing to put output under /sb in prod.

* Remove debug logging

* Remove HtmlPlugin from React Cosmos webpack config per random advice on internet.

* Testing cosmos build locations.

* Testing cosmos build locations 2.

* align rectangular button and change the order of notes (bldrs-ai#683)

* VYZN: (feature) hide/unhide and temporary isolate IFC elements (bldrs-ai#617)

* feat: custom viewer api

* subset list to dict

* remove log statement

* fix missing __getIFCViewerAPIMockSingleton

* pickByID new implementation

* fix: remove resetSelection guard to fix key down callback function lost state

* fix: reset selection guard back to fix failing tests and call the from the call back func changed

* subsets revisited

* unhide all hidden elements

* feature: ifc isolator component, incapsulates hide and isolate operations

* fix: ids loaded from meshes to insure having visual props

* fix: remove unused ifc classes imports

* fix: get express ids from model mesh  attributes for better performance

* fix: reset reveal upon unhide

* fix: turn off reveal on unhide all

* feat: hide/unhide icons in nav tree for spatial structures and root aggregators

* fix: failing unit tests

* linter fixes

* fix: reveal hidden elements material's depthTest

* re-evaluate reveal subset if on when hiding again

* fix: ifc viewer highlighter

* remove unused imports

* fix: disable hide icons on temp isolation mode

* reflect isoaltor status to selected elements store

* unit test for hide element by the tree icons

* toggle hide icon e2e test

* fix post processor

* fix failing cadview tests

* fix: placemarks broke the other post processing effects

* fix: remove singleton post-processor

* fix: space typo

* fix: disable lint error

* fix: maintain hidden elements when viewer changes

* fix: align hide icons to right

---------

Signed-off-by: Pablo Mayrgundter <pablo.mayrgundter@gmail.com>
Co-authored-by: Ibrahim Saad <ibrahim.saad@xbim.net>
Co-authored-by: OlegMoshkovich <oleg.mosh@gmail.com>
Co-authored-by: Pablo Mayrgundter <pablo.mayrgundter@gmail.com>

* Upgrade packages.  Fixup mui styling change to Dialog button.  Add fixtures for Dialog, About and fix ControlButton. (bldrs-ai#682)

Signed-off-by: Pablo Mayrgundter <pablo.mayrgundter@gmail.com>

* Suppress eslint violation per Pablo (bldrs-ai#688)

* Remove no-op ESLint rule control

---------

Signed-off-by: Pablo Mayrgundter <pablo.mayrgundter@gmail.com>
Co-authored-by: OlegMoshkovich <oleg.mosh@gmail.com>
Co-authored-by: Ron <rondoor124@gmail.com>
Co-authored-by: Pablo Mayrgundter <pablo.mayrgundter@gmail.com>
Co-authored-by: Ibrahim Saad <ibrahim.saad@xbim.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

VYZN: Viewer: Hiding of one or more elements by the user
3 participants