Skip to content

Use _category name_ in the URL, instead of the _category displayName_. #4031

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

Merged
merged 1 commit into from
Apr 22, 2025

Conversation

jonasfj
Copy link
Member

@jonasfj jonasfj commented Apr 10, 2025

Also clarify documentation, to make it a bit more obvious that a category has two names:

  • category name, the thing we reference in source code,
  • display name, the thing we display in HTML.

I imagine that the category name lends itself better to be used in a URL (probably using underscore). And the display name is probably something using whitespaces (which don't work nearly as well in a URL).

Also correct name -> displayName in README.


I don't know if we should make redirect pages for the old URLs. It's perhaps overkill, since the category feature isn't used by most packages. Does api.dart.dev or api.flutter.dev have topic pages?

Also clarify documentation and correct `name` -> `displayName` in
README.
@jonasfj jonasfj requested a review from srawlins April 10, 2025 12:18
Copy link
Member

@srawlins srawlins left a comment

Choose a reason for hiding this comment

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

Very nice, thank you!

@szakarias szakarias merged commit aaea637 into dart-lang:main Apr 22, 2025
9 checks passed
@jonasfj jonasfj deleted the use-category-name branch April 22, 2025 10:59
copybara-service bot pushed a commit to dart-lang/sdk that referenced this pull request Apr 28, 2025
Revisions updated by `dart tools/rev_sdk_deps.dart`.

dartdoc (https://github.com/dart-lang/dartdoc/compare/1788710..1a08646):
  1a08646a  2025-04-28  Sam Rawlins  Stop using InterfaceElementImpl2 (dart-lang/dartdoc#4041)
  38b7d2e0  2025-04-28  Sam Rawlins  Stop using ConstructorElementImpl (dart-lang/dartdoc#4040)
  ad65ae89  2025-04-25  Sarah Zakarias  Make redirect pages for categories (dart-lang/dartdoc#4037)
  9ab9ba05  2025-04-23  Parker Lougheed  Migrate remaining styles to use sass nesting (dart-lang/dartdoc#4024)
  aaea6377  2025-04-22  Jonas Finnemann Jensen  Use _category name_ in the URL, instead of the _category displayName_. (dart-lang/dartdoc#4031)
  0388c64e  2025-04-22  Jonas Finnemann Jensen  Do not make a copy of PUB_CACHE, just create an empty one instead. (dart-lang/dartdoc#4032)

tools (https://github.com/dart-lang/tools/compare/11a7719..11f4cf7):
  11f4cf7e  2025-04-24  Callum Moffat  [html] Various performance optimizations (dart-lang/tools#2019)
  98d4e4d9  2025-04-22  Simone Stasi  [html] fix TypeError in nth-child query selector (dart-lang/tools#2015)

Change-Id: Ic5d0a5f7f9393fa1a585b80ec1e014647224f151
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425200
Auto-Submit: Devon Carew <[email protected]>
Reviewed-by: Konstantin Shcheglov <[email protected]>
Commit-Queue: Konstantin Shcheglov <[email protected]>
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.

3 participants