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

Extend search bar functionality to open IFCs hosted on GitHub. #174

Merged
merged 23 commits into from Apr 22, 2022

Conversation

OlegMoshkovich
Copy link
Member

@OlegMoshkovich OlegMoshkovich commented Apr 6, 2022

  • Extend search bar functionality to open GitHub model URLs.
  • Add the ability to clear search bar input
  • Add a link icon to the search bar to explain the URL feature
  • Dynamically change the width of the search bar in the input string is longer then the defined min width
  • Add small size to buttons
  • minor: adjust style of snack_bar

https://olegmoshkovich.github.io/Share/share/v/gh/Swiss-Property-AG/Portfolio/main/EISVOGEL.ifc

@OlegMoshkovich OlegMoshkovich changed the title Check if the search input is the URL Extend search bar functionality to open IFCs hosted on GitHub. Apr 12, 2022
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.

The demo link isn't working for me.

Please add tests for the new code in ShareRoutes, and also the instructions page you point to still looks in progress, that right? I was noting that I think it needs more introductory text to help orient the user.

https://github.com/bldrs-ai/Share/wiki/GitHub-model-hosting

src/Components/Buttons.jsx Show resolved Hide resolved
src/Components/Buttons.jsx Show resolved Hide resolved
src/ShareRoutes.jsx Outdated Show resolved Hide resolved
src/ShareRoutes.jsx Outdated Show resolved Hide resolved
src/Components/SearchBar.jsx Outdated Show resolved Hide resolved
src/ShareRoutes.jsx Outdated Show resolved Hide resolved
src/ShareRoutes.jsx Outdated Show resolved Hide resolved
src/ShareRoutes.jsx Outdated Show resolved Hide resolved
@OlegMoshkovich
Copy link
Member Author

OlegMoshkovich commented Apr 13, 2022

The link should work now.
Created another wiki page about URL access.
Added tests for the methods in shared routes.

GitHub model hosting:
https://github.com/bldrs-ai/Share/wiki/GitHub-model-hosting
Open URL model:
https://github.com/bldrs-ai/Share/wiki/Open-IFC-model-hosted-on-GitHub

@pablo-mayrgundter PTAL.

src/ShareRoutes.test.jsx Outdated Show resolved Hide resolved
src/Components/SearchBar.jsx Outdated Show resolved Hide resolved
src/Components/SearchBar.jsx Outdated Show resolved Hide resolved
src/ShareRoutes.jsx Outdated Show resolved Hide resolved
src/ShareRoutes.jsx Outdated Show resolved Hide resolved
@OlegMoshkovich
Copy link
Member Author

@pablo-mayrgundter PTAL!

package.json Outdated Show resolved Hide resolved
src/Components/AboutControl.jsx Show resolved Hide resolved
src/Components/SearchBar.jsx Outdated Show resolved Hide resolved
src/Components/SearchBar.jsx Outdated Show resolved Hide resolved
src/Components/SearchBar.jsx Outdated Show resolved Hide resolved
src/ShareRoutes.jsx Outdated Show resolved Hide resolved
src/ShareRoutes.jsx Outdated Show resolved Hide resolved
src/ShareRoutes.jsx Outdated Show resolved Hide resolved
src/ShareRoutes.jsx Outdated Show resolved Hide resolved
src/ShareRoutes.test.jsx Outdated Show resolved Hide resolved
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.

Triggering another "Submit review" event to see if it will post to chat.

@pablo-mayrgundter
Copy link
Member

I accidentally pushed my changes to your fork&branch (a lot of that lately! 🫣) but I think we like it? Will wait to hear back your comments

src/ShareRoutes.jsx Outdated Show resolved Hide resolved
src/ShareRoutes.jsx Outdated Show resolved Hide resolved
@pablo-mayrgundter
Copy link
Member

Heya, I'm leaving for the weekend tomorrow so in the interest of time going to merge.

You said you were good and just had those comments. I did update to handle more types of links in looksLikeLink and then answered the other questions. So I think everything is addressed.

@pablo-mayrgundter pablo-mayrgundter merged commit 281dbc1 into bldrs-ai:main Apr 22, 2022
OlegMoshkovich added a commit to OlegMoshkovich/Share that referenced this pull request Apr 27, 2022
…-ai#174)

* add a method to check if the input is URL

* rename

* extract url parameters from search input

* debug the model path

* add styles and funcitons to the search bar

* moved url methods to share routes

* new build

* new build

* add test to share routes

* add test to share routes

* add test to share routes

* fixes

* add tests + parse url method

* add isURL and error messaging

* clean up

* clean up

* add fixes

* fixes

* search: thoughts on how to use regex capture group for github url parsing

* search: support both full URLs and paths in search.

* search: More case handling for load-by-link in searchbar.

* search: little more refactoring and test cases.

Co-authored-by: Pablo Mayrgundter <pablo.mayrgundter@gmail.com>
@OlegMoshkovich OlegMoshkovich deleted the search_URL branch April 27, 2022 15:13
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.

None yet

2 participants