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

[Feature]: Peek overlay of entity and bindings #17507

Closed
1 task done
kocharrahul7 opened this issue Oct 12, 2022 · 6 comments · Fixed by #20053
Closed
1 task done

[Feature]: Peek overlay of entity and bindings #17507

kocharrahul7 opened this issue Oct 12, 2022 · 6 comments · Fixed by #20053
Assignees
Labels
Enhancement New feature or request IDE Navigation Issues/feature requests related to IDE navigation, and context switching New Developers Pod Issues that new developers face while exploring the IDE

Comments

@kocharrahul7
Copy link
Contributor

kocharrahul7 commented Oct 12, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Summary

When hovering on an entity name (Widget, or action) in appsmith, it would be great if we peek into the value of the entity. For instance, while hovering on api1, I should be able to understand and access the values associated with API1. I should be able to see api1.data, the return type, and the info associated with it.

Handover file

https://zpl.io/o14Ww3Z

Why should this be worked on?

As a user, if I am looking at an app, and see bindings utils.data, I have no idea if utlis is a jsObject, or a query. I don't know the data which it is returning, and I don't know much about what it does. It would be a great way to peek into each variable and helps create visibility and understanding of what each binding is.

Questions and clarifications:

Question Answer
Will we accommodate any copy and paste functionality No. The user can select information from the overlay, and copy it if they require.
What information will we show We will handle this in 2 parts: 1. We will show the information in the show bindings submenu 2. Detailed evaluations, the way retool does this
What will the text formatting look like It will match the new designs. This will require an update on the design system, we will handle this, with approval from the DS pod
Will we have a grey background for users the way the evaluated value pane does? No. We should update the evaluated value element in the design system to match the designs created by Aakash
When do we show the tooltip? After a 200 ms delay of hover
Does this ever show at the same time as the evaluated value overlay? No. when the peek overlay appears, the evaluated value overlay should be hidden, and when a user starts to type, this is in turn hidden
What are the dimensions of the overlay? 300px width, and a max height of 12, with a scroll bar as an overflow. If there are less than 12 lines, then the overlay should be shorter
What are the highlighting states of the entities? When a user regular hovers on any entity which will have an overlay, we will highlight that entity in the blue colour defined in the designs. When the user hits cmd, IF the user can navigate to this entity, we will highlight it in yellow, as well as show an underline. Else, it will continue to be just a blue highlight.
What entities will be highlighted? Just the currently selected entity. That is to say, if a user hovers writes API1.data, and hovers on API1, we will just highlight API1. If the user hovers on data, we will highlight just data
@kocharrahul7 kocharrahul7 added Enhancement New feature or request New Developers Pod Issues that new developers face while exploring the IDE labels Oct 12, 2022
@kocharrahul7 kocharrahul7 added the IDE Navigation Issues/feature requests related to IDE navigation, and context switching label Oct 12, 2022
@github-actions github-actions bot removed the New Developers Pod Issues that new developers face while exploring the IDE label Oct 12, 2022
@eco-monk eco-monk added the New Developers Pod Issues that new developers face while exploring the IDE label Oct 12, 2022
@hetunandu
Copy link
Member

@aakashDesign Please add the final designs on this issue

@eco-monk
Copy link
Contributor

Discussed last week during a IDE weekly meet:
Need to close evaluated value pop-up whenever overlay is active.

(sorry for posting late, I forgot to update this)
cc: @kocharrahul7

@eco-monk
Copy link
Contributor

Progress so far last week:

@hetunandu hetunandu removed their assignment Jan 28, 2023
@eco-monk
Copy link
Contributor

eco-monk commented Feb 1, 2023

https://mac-s-g.github.io/react-json-view/demo/dist/
We use rjv-default theme for the coloring

cc: @shwetha-ramesh

@eco-monk eco-monk mentioned this issue Feb 9, 2023
13 tasks
eco-monk added a commit that referenced this issue Feb 17, 2023
## Description

Hover over appsmith properties in code to peek data.
<img width="380" alt="image"
src="https://user-images.githubusercontent.com/66776129/217707810-164924c0-36e8-4450-b087-18af333c7547.png">

This right now covers:
- Queries/JsObjects/Apis/Widgets and their properties.
- Note: For query or Api, this'll work only upto `Api.data`. (Not
`Api.data.users[0].id`)
- This is because of the way codemirror renders code and we'll need more
time to see how this is best handled.


Misc:
- added `react-append-to-body` to work with variable height for peek
overlay
- we needed a container that doesn't apply `position: absolute` to
itself
- Because, when a container's `height` is zero with `position: absolute`
(like in bp3-portal), child elements cannot be positioned using just the
`bottom` property
- with `react-append-to-body`, the container won't have `position:
absolute`, instead it is applied to the child element `<div>` directly,
hence we can position using `bottom` property.


Fixes #17507


Media
https://www.loom.com/share/0f17918fcd604805b023c215d57fce43


## Type of change
- New feature (non-breaking change which adds functionality)


## How Has This Been Tested?

- Manual

### Test Plan
https://github.com/appsmithorg/TestSmith/issues/2173
https://github.com/appsmithorg/TestSmith/issues/2178

### Issues raised during DP testing

#20053 (comment)

#20053 (comment)

## Checklist:
### Dev activity
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag


### QA activity:
- [x] Test plan has been approved by relevant developers
- [ ] Test plan has been peer reviewed by QA
- [x] Cypress test cases have been added and approved by either SDET or
manual QA
- [ ] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [ ] Added Test Plan Approved label after reveiwing all Cypress test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request IDE Navigation Issues/feature requests related to IDE navigation, and context switching New Developers Pod Issues that new developers face while exploring the IDE
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

6 participants