cedricdelpoux / cedricdelpoux/react-simple-tooltip

Tooltip should be rendered in the document body instead of just outside of div

Open
#13 7 comments 2 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
55
Forks
18
PR merge metrics
No merged PRs in 30d

Description

Currently, the tooltip is get rendered in this way

```


hello //main element
class="sc-dnqmqq fOiqOs" offset="8" open>Tooltip
//tooltip

```
But in this case, if there is some other div are present before after then some portion of the tooltip cuts off.

In order to fix this, I think you need to render you tooltip every time just before the document body gets the end.

```


hello //main element

class="tooltip" offset="8" open>Tooltip
//tooltip

```

For your reference: http://jamesknelson.com/rendering-react-components-to-the-document-body/

Contributor guide

Open the contributing guide

Research direction

Start by tracing the tooltip component's current rendering path and compare its DOM output with the examples in the issue. Read the linked React document-body rendering article for context. Done means the tooltip is rendered at the end of the document body so surrounding divs no longer clip it; no test file is named, so verify the resulting markup against the reported case.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.