Skip to content

Conversation

@alina-zaieva
Copy link
Contributor

@alina-zaieva alina-zaieva commented Mar 27, 2023

Previous Behavior

Not applicable, this is a new functionality.

New Behavior

getFileTypeIconAsUrl utility is added to @fluentui/react-file-type-icons package. It uses the same implementation as existing getFileTypeIconAsHTMLString, but instead of returning a string with img DOM element it returns a raw URL that can be passed to an img element in src attribute.

Related Issue(s)

@alina-zaieva alina-zaieva force-pushed the add-getFileTypeIconAsUrl-to-react-file-type-icons branch from 65e7d71 to f173b2c Compare March 27, 2023 14:24
@alina-zaieva
Copy link
Contributor Author

@alina-zaieva please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@microsoft-github-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@microsoft-github-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@microsoft-github-policy-service agree company="Microsoft"

Contributor License Agreement

@microsoft-github-policy-service agree company="Microsoft"

@fabricteam
Copy link
Collaborator

fabricteam commented Mar 27, 2023

📊 Bundle size report

🤖 This report was generated against cf06ea0a7e401c18e5a7f829b95dc2405ce0c867

@codesandbox-ci
Copy link

codesandbox-ci bot commented Mar 27, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 57c6bdb:

Sandbox Source
@fluentui/react 8 starter Configuration
@fluentui/react-components 9 starter Configuration

@size-auditor
Copy link

size-auditor bot commented Mar 27, 2023

Asset size changes

Size Auditor did not detect a change in bundle size for any component!

Baseline commit: cf06ea0a7e401c18e5a7f829b95dc2405ce0c867 (build)

@behowell behowell requested a review from tomi-msft April 27, 2023 21:28
@alina-zaieva alina-zaieva force-pushed the add-getFileTypeIconAsUrl-to-react-file-type-icons branch from f173b2c to 25cd19a Compare May 2, 2023 07:51
@tomi-msft tomi-msft marked this pull request as ready for review May 24, 2023 00:03
@tomi-msft tomi-msft requested review from a team, Jahnp and bigbadcapers as code owners May 24, 2023 00:03
@bigbadcapers
Copy link
Contributor

This looks distinctly useful in terms of adding more flexiblity to the invocation methods to ensure every app always gets the right filetype icon. It seems actually pretty necessary to support a more broad set of platforms. From that standpoint it's got approval from me.

I can't speak as to the way the method is being published, eg TypeScript or Fluent conventions as I'm not the expert there.

Copy link
Contributor

@bigbadcapers bigbadcapers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved from a functionality / needs standpoint. Very useful new method. Please check with other TypeScript/RN/Fluent experts on as to whether it's been exposed with the proper naming conventions, etc.

@alina-zaieva
Copy link
Contributor Author

@tomi-msft can you help with getting necessary approvals to complete this PR? 🙂

@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/[email protected] has been released which incorporates this pull request.:tada:

Handy links:

@alina-zaieva alina-zaieva deleted the add-getFileTypeIconAsUrl-to-react-file-type-icons branch June 12, 2023 09:10
marcosmoura added a commit to marcosmoura/fluentui that referenced this pull request Jun 13, 2023
* master:
  applying package updates
  doc: Remove wrong recommendation from input (microsoft#28168)
  fix: Outline color now respects OS force colors settings (microsoft#28182)
  Datepicker onCalendarOpenStateChange prop (microsoft#28136)
  feat(react-file-type-icons): Add getFileTypeIconAsUrl utility (microsoft#27336)
  applying package updates
  [FIX] Updates selection dot and label positioning for ChoiceGroupOption when an Image or Icon is present. (microsoft#28173)
  chore(react-infobutton): Rename InfoTip to InfoIcon (microsoft#28177)
  fix(react-datepicker-compat): Make DatePicker Compat stories SSR safe (microsoft#28017)
  Added `tab` focus mode to the Breadcrumb (microsoft#28046)
  docs: Add usable documentation (microsoft#28155)
  applying package updates
  Fix up rebase code (microsoft#27864)
  fix: ContextualMenu indexing in sections (microsoft#28127)
  applying package updates
  fix: Layer sets focus visible classname for its FocusRectsProvider (microsoft#28157)
  docs(react-infobutton): Update stories to show better guidance (microsoft#28144)
  fix(react-avatar): Do not render the image when src prop is undefined (microsoft#28146)
  feat(react-datepicker-compat): Add null to value prop and handle controlled cases correctly (microsoft#28056)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Expand @fluentui/react-file-type-icons for use in React without Fluent UI v8

6 participants