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

Publish Initial Tooltip Package #3237

Merged
merged 47 commits into from
Nov 30, 2023
Merged
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
21c3904
new tooltip folders
gulnazsayed Apr 10, 2023
efed626
updated package.json
gulnazsayed Apr 10, 2023
da06a91
added props
gulnazsayed May 22, 2023
d159c7c
added native tooltip view
gulnazsayed May 22, 2023
950bc43
js changes
gulnazsayed Jun 7, 2023
110287b
added test page
gulnazsayed Jun 12, 2023
2e2d345
updated platform status
gulnazsayed Jun 12, 2023
74ab272
adding tooltip test page
gulnazsayed Jul 10, 2023
85e28f2
added more tooltip enabled components in test file
gulnazsayed Sep 26, 2023
7b62937
code cleanup and test positioning prop
gulnazsayed Sep 29, 2023
446900a
fixed props/bundling issue and updated dependencies
gulnazsayed Nov 13, 2023
2b6391d
test description
gulnazsayed Nov 13, 2023
79e3919
updated prop comments and removed empty tokens
gulnazsayed Nov 13, 2023
2c23acd
remove comments
gulnazsayed Nov 16, 2023
cbc4b20
changed jest to win32
gulnazsayed Nov 16, 2023
0e5b2ec
Merge branch 'main' into tooltip/new
gulnazsayed Nov 16, 2023
9aa9494
updated dependencies
gulnazsayed Nov 20, 2023
4456111
Merge branch 'tooltip/new' of https://github.com/gulnazsayed/fluentui…
gulnazsayed Nov 20, 2023
da2654b
set importHelper
gulnazsayed Nov 20, 2023
3883d29
Merge branch 'master' into tooltip/new
gulnazsayed Nov 20, 2023
0bf4fd7
update dependency versions
gulnazsayed Nov 21, 2023
df3051d
tentatively updating yarn.lock
gulnazsayed Nov 21, 2023
402aacf
Change files
gulnazsayed Nov 21, 2023
9c7eddb
fixing dependencies
gulnazsayed Nov 21, 2023
a715809
capabilities
gulnazsayed Nov 21, 2023
0cb7dbc
update yarn.lock
gulnazsayed Nov 21, 2023
dffed1c
update dependencies
gulnazsayed Nov 21, 2023
5558d22
update yarn.lock
gulnazsayed Nov 21, 2023
9a3309b
fixed import orders
gulnazsayed Nov 21, 2023
2f1a253
update target type
gulnazsayed Nov 21, 2023
bfeb69f
add capabilities
gulnazsayed Nov 22, 2023
1a408a1
add dependency and remove unused capabilities
gulnazsayed Nov 22, 2023
c4d8c26
update yarn.lock
gulnazsayed Nov 22, 2023
e8de9c8
update snapshots
gulnazsayed Nov 22, 2023
aae1d5c
add style prop to Tooltip to avoid layout issues
gulnazsayed Nov 27, 2023
f061424
add separate position test
gulnazsayed Nov 28, 2023
224b86c
testing comment
gulnazsayed Nov 28, 2023
789f14f
fixing comments
gulnazsayed Nov 28, 2023
27f4f98
fixing more comments
gulnazsayed Nov 28, 2023
8a15b2a
removed useTooltip and changed to stagedComponent
gulnazsayed Nov 28, 2023
9fe4489
fixing more comments
gulnazsayed Nov 28, 2023
296118c
fixed pr comments
gulnazsayed Nov 28, 2023
42aa392
updated button import
gulnazsayed Nov 30, 2023
a0af086
fixed lint errors
gulnazsayed Nov 30, 2023
5b61c04
yarn.lock
gulnazsayed Nov 30, 2023
d830561
Merge branch 'master' into tooltip/new
gulnazsayed Nov 30, 2023
8baef75
yarn.lock
gulnazsayed Nov 30, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add separate position test
gulnazsayed committed Nov 28, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit f061424451e3a0989783b17a089ca49ac3471e39
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ import { Tooltip } from '@fluentui-react-native/tooltip';
export const TooltipDefault: React.FunctionComponent = () => {
return (
<View>
<Tooltip content="Test" positioning="topCenter">
<Tooltip content="Test">
<Button>Test</Button>
</Tooltip>
<Tooltip content="Test 2">
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import * as React from 'react';
import { View } from 'react-native';

import { Button } from '@fluentui-react-native/experimental-button';
import { Tooltip } from '@fluentui-react-native/tooltip';

export const TooltipPosition: React.FunctionComponent = () => {
const topCenterRef = React.useRef<View>(null);

return (
<View>
<Tooltip content="Test" positioning="topCenter">
<Button>No Target + TopCenter</Button>
</Tooltip>
<Tooltip content="Test" positioning="topCenter" target={topCenterRef}>
<Button componentRef={topCenterRef}>Target + TopCenter</Button>
</Tooltip>
</View>
);
};
Original file line number Diff line number Diff line change
@@ -2,15 +2,21 @@ import * as React from 'react';

import { TOOLTIP_TESTPAGE } from './consts';
import { TooltipDefault } from './TooltipDefault';
import { TooltipPosition } from './TooltipPosition';
import { Test } from '../Test';
import type { TestSection, PlatformStatus } from '../Test';

const tooltipSections: TestSection[] = [
{
name: 'Tooltip',
name: 'Default',
testID: TOOLTIP_TESTPAGE,
component: TooltipDefault,
},
{
name: 'Target + Positioning',
testID: TOOLTIP_TESTPAGE,
component: TooltipPosition,
},
];

export const TooltipTest: React.FunctionComponent = () => {
2 changes: 2 additions & 0 deletions packages/experimental/Tooltip/src/Tooltip.types.ts
Original file line number Diff line number Diff line change
@@ -48,6 +48,8 @@ export type TooltipProps = React.PropsWithChildren<{
/**
* Target anchor that tooltip uses for relative positioning. Certain components may proffer a string as an anchor target, such as
* anchoring to a point inside the component.
*
* If not provided, will anchor to the wrapper element.
*/
target?: React.RefObject<React.Component> | string;