Skip to content
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

Implement /collections Page #2561

Merged
merged 1 commit into from
Nov 18, 2023

Conversation

veryordinally
Copy link
Collaborator

@veryordinally veryordinally commented Oct 19, 2023

Implements #2524

@veryordinally
Copy link
Collaborator Author

So far just a quick proof of concept that displays all parent inscriptions in random order. Probably need an index to efficiently show the parents in the order suggested in #2524 so will require upgrade to database schema version. Also obviously required pagination, and it would make sense to add a /collection page as well.

@veryordinally
Copy link
Collaborator Author

Now sorting as suggested in #2524 using only existing indexes. There isn't a good way to add an index to get the desired order.

Still in proof of concept stage. No pagination so far.

@raphjaph
Copy link
Collaborator

raphjaph commented Nov 15, 2023

TODO:

  • add pagination
  • test that the page only shows 100 inscriptions/collections
  • test prev and next

@raphjaph raphjaph marked this pull request as ready for review November 17, 2023 15:31
Copy link
Collaborator

@casey casey left a comment

Choose a reason for hiding this comment

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

Left a few comments, otherwise looks great.

src/subcommand/server.rs Outdated Show resolved Hide resolved
src/subcommand/server.rs Outdated Show resolved Hide resolved
@raphjaph raphjaph requested a review from casey November 17, 2023 23:23
Copy link
Collaborator

@casey casey left a comment

Choose a reason for hiding this comment

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

I just realized that we can avoid integer conversions if we just accept a usize argument, so I pushed that change. LGTM!

@raphjaph raphjaph enabled auto-merge (squash) November 18, 2023 15:38
@casey casey disabled auto-merge November 18, 2023 19:59
@casey casey force-pushed the 2524-add-a-collections-page branch from 2daa678 to 8f96d4d Compare November 18, 2023 20:03
@casey casey enabled auto-merge (squash) November 18, 2023 20:03
@casey casey merged commit b50b536 into ordinals:master Nov 18, 2023
6 checks passed
@casey
Copy link
Collaborator

casey commented Nov 18, 2023

I added the collections page to the homepage too, so it's in the tabs.

@raphjaph raphjaph mentioned this pull request Nov 24, 2023
thedoublejay pushed a commit to sadoprotocol/ord that referenced this pull request Nov 27, 2023
* Fix lost sats bug (ordinals#2666)

* Add Hindi version of handbook (ordinals#2648)

* Remove Index::index_block_inscription_numbers (ordinals#2667)

* Hide protocol inscriptions (ordinals#2674)

* Don't color links in headers (ordinals#2678)

* Add inscription charms (ordinals#2681)

* Group rune server tests (ordinals#2685)

* Add inscription compression (ordinals#1713)

* Fix media table formatting (ordinals#2686)

* Update schema version for charms (ordinals#2687)

* Fix unbound outpoint server error (ordinals#2479)

* Add binary media type (ordinals#2671)

* Clean up install.sh (ordinals#2669)

* Add /collections Page (ordinals#2561)

* Preview font inscriptions (ordinals#2692)

* Only load used language highlight module in code preview (ordinals#2696)

* Only try to create the database if it wasn't found (ordinals#2703)

* Move postage into batch file (ordinals#2705)

* Add destination field to batch (ordinals#2701)

* Use sequence numbers database keys (ordinals#2664)

* Update redb to 1.4.0 (ordinals#2714)

* Refactor inscriptions paginations (ordinals#2715)

* Display table stats in `ord index info` (ordinals#2711)

* Use redb's recovery callback API (ordinals#2584)

* Allow setting CSP origin (ordinals#2708)

* Remove default file path from `ord index export --tsv` (ordinals#2717)

* Use icons in nav bar (ordinals#2722)

* Add Debian packaging instructions (ordinals#2725)

* Add Homebrew install instructions to readme (ordinals#2726)

* Add sat recursive endpoints with index and pagination (ordinals#2680)

* Only accept sat number in recursive endpoint (ordinals#2732)

* Fix typo in docs/src/inscriptions/metadata.md (ordinals#2731)

* Add docs for metadata recursive endpoint (ordinals#2734)

* Remove `RUNE` from <h1> on /rune (ordinals#2728)

* Add /r/children recursive endpoint (ordinals#2431)

* Add docs and examples for sat recursive endpoint (ordinals#2735)

* Ignore flaky test (ordinals#2742)

* Update docs to include all fields, including content-encoding (ordinals#2740)

* Add docs for child recursive endpoint (ordinals#2743)

* Hide JSON and .btc (ordinals#2744)

* Release 0.12.0 (ordinals#2746)

---------

Co-authored-by: raph <[email protected]>
Co-authored-by: duttydeedz <[email protected]>
Co-authored-by: Casey Rodarmor <[email protected]>
Co-authored-by: liam <[email protected]>
Co-authored-by: Eloc <[email protected]>
Co-authored-by: Julian Eager <[email protected]>
Co-authored-by: ordinally <[email protected]>
Co-authored-by: Christopher Berner <[email protected]>
Co-authored-by: Rijndael <[email protected]>
Co-authored-by: vuittont60 <[email protected]>
thedoublejay pushed a commit to sadoprotocol/ord that referenced this pull request Dec 1, 2023
* Fix lost sats bug (ordinals#2666)

* Add Hindi version of handbook (ordinals#2648)

* Remove Index::index_block_inscription_numbers (ordinals#2667)

* Hide protocol inscriptions (ordinals#2674)

* Don't color links in headers (ordinals#2678)

* Add inscription charms (ordinals#2681)

* Group rune server tests (ordinals#2685)

* Add inscription compression (ordinals#1713)

* Fix media table formatting (ordinals#2686)

* Update schema version for charms (ordinals#2687)

* Fix unbound outpoint server error (ordinals#2479)

* Add binary media type (ordinals#2671)

* Clean up install.sh (ordinals#2669)

* Add /collections Page (ordinals#2561)

* Preview font inscriptions (ordinals#2692)

* Only load used language highlight module in code preview (ordinals#2696)

* Only try to create the database if it wasn't found (ordinals#2703)

* Move postage into batch file (ordinals#2705)

* Add destination field to batch (ordinals#2701)

* Use sequence numbers database keys (ordinals#2664)

* Update redb to 1.4.0 (ordinals#2714)

* Refactor inscriptions paginations (ordinals#2715)

* Display table stats in `ord index info` (ordinals#2711)

* Use redb's recovery callback API (ordinals#2584)

* Allow setting CSP origin (ordinals#2708)

* Remove default file path from `ord index export --tsv` (ordinals#2717)

* Use icons in nav bar (ordinals#2722)

* Add Debian packaging instructions (ordinals#2725)

* Add Homebrew install instructions to readme (ordinals#2726)

* Add sat recursive endpoints with index and pagination (ordinals#2680)

* Only accept sat number in recursive endpoint (ordinals#2732)

* Fix typo in docs/src/inscriptions/metadata.md (ordinals#2731)

* Add docs for metadata recursive endpoint (ordinals#2734)

* Remove `RUNE` from <h1> on /rune (ordinals#2728)

* Add /r/children recursive endpoint (ordinals#2431)

* Add docs and examples for sat recursive endpoint (ordinals#2735)

* Ignore flaky test (ordinals#2742)

* Update docs to include all fields, including content-encoding (ordinals#2740)

* Add docs for child recursive endpoint (ordinals#2743)

* Hide JSON and .btc (ordinals#2744)

* Release 0.12.0 (ordinals#2746)

* Hide all text (ordinals#2753)

* Add batch to preview command (ordinals#2752)

* Add stuttering curse (ordinals#2745)

* Batch inscribe on same sat (ordinals#2749)

* Allow setting the sat to inscribe (ordinals#2765)

* Select further away coins which meet target (ordinals#2724)

* Fix typos (ordinals#2768)

* Add ability to specify sat to batch inscribe (ordinals#2770)

* Add commands to etch and list runes (ordinals#2544)

* Set CSP origin in deploy script (ordinals#2764)

Co-authored-by: raph <[email protected]>

* Add `public` to /content Cache-Control headers (ordinals#2773)

* Release 0.12.1 (ordinals#2776)

* Bless cursed inscriptions after Jubilee height (ordinals#2656)

* Hide /content/<INSCRIPTION_ID> HTML inscriptions (ordinals#2778)

* Release 0.12.2 (ordinals#2780)

* fix(test): error test from version 0.12.2

---------

Co-authored-by: raph <[email protected]>
Co-authored-by: duttydeedz <[email protected]>
Co-authored-by: Casey Rodarmor <[email protected]>
Co-authored-by: liam <[email protected]>
Co-authored-by: Eloc <[email protected]>
Co-authored-by: Julian Eager <[email protected]>
Co-authored-by: ordinally <[email protected]>
Co-authored-by: Christopher Berner <[email protected]>
Co-authored-by: Rijndael <[email protected]>
Co-authored-by: vuittont60 <[email protected]>
Co-authored-by: gmart7t2 <[email protected]>
Co-authored-by: xiaolou86 <[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