icu4x icon indicating copy to clipboard operation
icu4x copied to clipboard

Initial constructor documentation overhaul

Open sffc opened this issue 3 years ago • 1 comments

This PR is based on the excellent feedback on https://github.com/unicode-org/icu4x/issues/2348#issuecomment-1249563656. I made the following improvements:

  1. A brand new documentation page about constructors, which includes a decision chart similar to std::collections
  2. Links to that documentation page from all constructors
  3. Some editorializing in both the new documentation page and the main icu_provider page about why data providers are important and what explicit data providers achieve (I incorporated some text from Zibi's post)
  4. Examples on each source data provider demonstrating how it works with its corresponding constructor (BlobDataProvider, StaticDataProvider, FsDataProvider, and AnyPayloadProvider)

I started by updating icu_decimal::FixedDecimalFormatter. If these changes look good, I'll do them to all the rest of the constructors.

What I did not do in this PR is address concerns involving BakedDataProvider. That deserves its own PR, including a tutorial on how to leverage BakedDataProvider in your build.rs file.

sffc avatar Sep 16 '22 23:09 sffc

Docs previews:

sffc avatar Sep 18 '22 23:09 sffc