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

add title UI element to viewer #336

Closed
kfarr opened this issue Sep 3, 2023 · 7 comments
Closed

add title UI element to viewer #336

kfarr opened this issue Sep 3, 2023 · 7 comments
Assignees

Comments

@kfarr
Copy link
Collaborator

kfarr commented Sep 3, 2023

From the 3dstreet viewer -- as a scene viewer, if the scene has a name, the scene name should be visible. the scene name should be accessible to viewer UI (also aframe scene) from all methods of loading scenes: 3dstreet json, streetmix, 3dstreet cloud

This should use: #335 such as:
AFRAME.scenes[0].getAttribute('metadata').sceneTitle

This UI element should update if the component property value changes (it may be set by means of editor or a loader)

Figma:
https://www.figma.com/file/W9jid3A0jgssnIKBFEvG38/3DStreet-2022?type=design&node-id=5482-23977&mode=design&t=0PBswixNj1m6p5ZK-4

Pasted png for convenience:
image

The title should not be clickable, and clicks on the title should instead go to the 3d canvas as though the name wasn't there

brainstorming ways to solve this:

  • another entity / component titleOverlay added to scene or viewer
  • it creates a div with appropriate styling to be a title element. if the custom font is loaded great (what is that font again?) where is do we have a div with text? one of the buttons?
@kfarr kfarr moved this from Not Ready To Do to To Do in 3DStreet Dev Tracking Sep 3, 2023
@github-project-automation github-project-automation bot moved this to Not Ready To Do in 3DStreet Dev Tracking Sep 3, 2023
@kfarr kfarr moved this from To Do to In progress in 3DStreet Dev Tracking Sep 6, 2023
@kfarr kfarr moved this from In progress to To Do in 3DStreet Dev Tracking Sep 6, 2023
@kfarr kfarr mentioned this issue Sep 6, 2023
@kfarr kfarr moved this from To Do - Soon to To Do - High Prio in 3DStreet Dev Tracking Sep 13, 2023
@Algorush
Copy link
Collaborator

From the 3dstreet viewer -- as a scene viewer, if the scene has a name, the scene name should be visible. the scene name should be accessible to viewer UI (also aframe scene) from all methods of loading scenes: 3dstreet json, streetmix, 3dstreet cloud

So I can place the title update in the update function of the metadata component? I'll try to make the first version using a div, and the css property pointer-event: none for non-clickability

@Algorush
Copy link
Collaborator

Algorush commented Sep 23, 2023

#359
I've added a new div#sceneTitle to the end of the body for now. It is added dynamically if sceneTitle is passed to metadata. Perhaps later place it in another place if needed

@kfarr kfarr moved this from To Do - High Prio to For Review in 3DStreet Dev Tracking Sep 25, 2023
@kfarr
Copy link
Collaborator Author

kfarr commented Sep 26, 2023

@Algorush this looks really good!

Some feedback:

  • metadata component should not have side effects of creating or updating a div, instead there should be separate component for that such as 'title-div' or 'metadata-title' which will also be on the scene entity. the new component will need to listen for an event from metadata component upon update, and it will need to emit an event. I can't remember offhand how to do this but I can help dig up some old examples if helpful.
  • may need to change location (to top) or justification (to left) later, but ok as-is for now

@kfarr kfarr moved this from For Review to In progress in 3DStreet Dev Tracking Sep 26, 2023
@kfarr kfarr moved this from In progress to To Do - High Prio in 3DStreet Dev Tracking Sep 26, 2023
@kfarr
Copy link
Collaborator Author

kfarr commented Oct 6, 2023

some more resources on event stuff:

@Algorush
Copy link
Collaborator

Algorush commented Oct 7, 2023

added commit with scene-title component and event emitter from metadata component

@kfarr kfarr moved this from To Do - High Prio to For Review in 3DStreet Dev Tracking Oct 7, 2023
@kfarr
Copy link
Collaborator Author

kfarr commented Oct 16, 2023

excellent for v1!

@kfarr
Copy link
Collaborator Author

kfarr commented Oct 16, 2023

closed with #359

@kfarr kfarr closed this as completed Oct 16, 2023
@github-project-automation github-project-automation bot moved this from For Review to Done in 3DStreet Dev Tracking Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants