Skip to content

Sort by updated time feature for examples page #31339

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

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

sinanata
Copy link

Attempted to add a simple generate-timestamps node script and a timestamp-based sort by update date feature to the examples page. I believe new features and updates are getting lost on newcomers who are not regularly following the project. I am not a developer, so please feel free to ignore if this is irrelevant. Cheers.
image

@WestLangley
Copy link
Collaborator

Sorting by "date added" may make more sense than sorting by "date modified".

Or, just add the release ( e.g., "r177" ) as a tag to tags.json.

@sinanata
Copy link
Author

Sorting by "date added" may make more sense than sorting by "date modified".

Or, just add the release ( e.g., "r177" ) as a tag to tags.json.

I got the created timestamp in timestamps.json but I thought updates might also be important for examples

@cmhhelgeson
Copy link
Contributor

cmhhelgeson commented Jun 30, 2025

I'd also prefer date added over date modified. Often, examples are trivially updated to use more up to date syntax, even if the core code of the example itself has not been updated. For instance, PRs like #28241 make minor modifications to a large number of older examples. If we were to go by date updated, then many examples that have been in the codebase for nearly a decade will seem to be only a year old at most.

Alternatively, there could be a sort by option allowing the user to sort alphabetically, by date added, or by date updated. Nonetheless, the date displayed in italics alongside the title should probably be date added.

@cmhhelgeson
Copy link
Contributor

@Mugen87 I don't think this PR relates to documentation?

@Mugen87
Copy link
Collaborator

Mugen87 commented Jun 30, 2025

You're right, I've misinterpreted the PR. Deleted my comment to avoid confusion.

@sinanata
Copy link
Author

@cmhhelgeson got it, then I'll provide options and make the "added date" default, does that make sense?

1- Added alphabetical and date created sorting, defaulting to date created
2- Now aligned with overall lowercase style
3- Removed "/" before "17 days ago" text which was out of context
Copy link

github-actions bot commented Jul 1, 2025

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 337.69
78.76
337.69
78.76
+0 B
+0 B
WebGPU 557.35
154.34
557.35
154.34
+0 B
+0 B
WebGPU Nodes 556.27
154.12
556.27
154.12
+0 B
+0 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Before After Diff
WebGL 468.91
113.45
468.91
113.45
+0 B
+0 B
WebGPU 632.98
171.34
632.98
171.34
+0 B
+0 B
WebGPU Nodes 588.11
160.69
588.11
160.69
+0 B
+0 B

@sinanata
Copy link
Author

sinanata commented Jul 1, 2025

@cmhhelgeson the commit a399191 should do
Ekran görüntüsü 2025-07-01 145626
Ekran görüntüsü 2025-07-01 145634

@sinanata
Copy link
Author

sinanata commented Jul 1, 2025

Sorry for spamming, guys. Further simplification was possible, so I couldn't resist.
Ekran görüntüsü 2025-07-01 153840

@WestLangley
Copy link
Collaborator

The webgl, webgpu, svg examples are in separately-sorted lists. That may be confusing.

Also, I'd suggest setting the label to sort by "newest", instead of "date created". Check how GitHub sorts Issues.

@sinanata
Copy link
Author

sinanata commented Jul 1, 2025

WebGL and WebGPU separation seemed intentional, serving as main categories. In the currently live version, they are kept in search results.

If I go the "newest" path, I have to go for the "oldest", etc, too. I was aiming to reduce the number of words/icons from the feature.

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.

4 participants