The code examples on https://developer.microsoft.com/en-us/fabric#/controls/web/activityitem show relative paths to the components, rather than examples of how to import from the packages.
e.g. example shows
import * as React from 'react';
import { css, classNamesFunction } from 'office-ui-fabric-react/lib/Utilities';
import { ActivityItem } from '../ActivityItem';
import { getStyles, IActivityItemExampleStyleProps, IActivityItemExampleStyles } from './ActivityItem.Example.styles';
import { Icon } from '../../../Icon';
import { Link } from '../../../Link';
Where it would be more helpful to users if the example showed exactly what they would need to import. E.g
import * as React from 'react';
import { css, classNamesFunction } from 'office-ui-fabric-react/lib/Utilities';
import { ActivityItem } from office-ui-fabric-react/lib/ActivityItem';
import { getStyles, IActivityItemExampleStyleProps, IActivityItemExampleStyles } from './ActivityItem.Example.styles';
import { Icon } from 'office-ui-fabric-react/lib/Icon';
import { Link } from 'office-ui-fabric-react/lib/Link';
Just wanted to post and let you know that I'm working not only on fixing this example and all examples, but also on a CI script that will prevent examples from having relative paths in general. Thanks for reporting!
I did not include ActivityItemStyles.ts fix in this PR as both the PR and ActivityItemStyles.ts contents are pretty chunky. We need to come up with a better approach for larger example helpers. Based on your issue I'm assuming that's not currently an issue for you. Let me know if it is. Thanks!
:tada:This issue was addressed in #9170, which has now been successfully released as @uifabric/[email protected].:tada:
Handy links:
:tada:This issue was addressed in #9170, which has now been successfully released as [email protected].:tada:
Handy links:
:tada:This issue was addressed in #9170, which has now been successfully released as @uifabric/[email protected].:tada:
Handy links:
Most helpful comment
Just wanted to post and let you know that I'm working not only on fixing this example and all examples, but also on a CI script that will prevent examples from having relative paths in general. Thanks for reporting!