| Summary: | Implement the ability to show hover info during content assist | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Eric Moffatt <emoffatt> | ||||
| Component: | Client | Assignee: | Project Inbox <orion.client-inbox> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | curtis.windatt.public, Michael_Rennie | ||||
| Version: | unspecified | ||||||
| Target Milestone: | 8.0 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 450152, 453086 | ||||||
| Attachments: |
|
||||||
|
Description
Eric Moffatt
I've committed the initial stub code for this. It's in contentAssist.js but commented out... The code that actually fetches and formats the SJDoc needs to be added by Michael; note that we may need to augment the tooltip to allow 'markdown' as a known 'contents' type (i.e. directly returned from the target's 'getHoverInfo' method as opposed to through extension plugins). There's also an initialization defect where we don't show the hover on the initial proposal but only when you arrow through them. Here's the commit: https://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=e56eceaf99e959d854411eeb723d8eadb57e1243 Created attachment 249076 [details]
Hover for JS proposals
In the screen shot you can see the hover is not quite polished yet:
1. it opens way off from the selected item
2. there is no support for formatting the returned results
3. its too big, I would expect it to bound itself so it looks / feels more like a child of the assist popup
4. might be nice if it also had the same colouring / style as the assist popup
To get this example working I uncommented the code in master and returned a 'hover' property from the JS proposal computer. It might be a good idea to be able to return a hover object like we do for the hover service. That way clients could format their hover using markdown et. al. like we can for the normal hover.
I pushed support in the JS tooling to forward doc + url from an index: http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=431eae3b7cd432b10d1863a16466b896bc15b82b A JS proposal will now and a hover object to a proposal that looks like: { hover: <markdown text>, type: 'markdown' } http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=aa9059222067fab6f4df6abfa12ab6ce7667bbd8 1) Set the sizing of the hover to about the size of the content assist, allow vertical scrolling. 2) Tooltip opens with content assist and stays open until content assist closes. 3) Tooltip can be anchored on the left side if no room on the right. Since we have no real useful information to show in the popup, I have left the activation code in the editor ContentAssist.js commented out. http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=3c07436fa644154fdb6033c3b2c49801ebde6620 1) Enabled tooltips in master 2) Tooltip content now calculated using the hover service (now supports markdown, etc.). The proposal is passed to in the context. 3) Additional tweaks to look and feel. I'll update the developer guide. Marking as FIXED. |