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

feat: add world listing and world search #24

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

stiefeljackal
Copy link
Contributor

@stiefeljackal stiefeljackal commented Dec 3, 2024

This PR adds the following features to go.resonite.com based on #17:

  • World Listing
    • Show Featured Ribbon on Listing Item
  • World Search Box
  • Paging Controls for World Browsing

Items marked as completed are in this PR.

World Listing

Currently, the look and feel of the world listing page mimics that of what you would typically see when performing a web search via a search engine. This is how the current listing looks:

image

Show Featured Ribbon on Listing Item

For featured worlds, the "Featured Ribbon" SVG from the press kit is used here. The SVG itself was modified to remove unnecessary tags and to add CSS styling on the SVG such as the coloring. The "Featured Ribbon" is included in the heading when the world is marked as Featured; visually hidden text ("Featured World") is also provided at the end of the world name for accessibility purposes.

image

World Search Box

The world search box functions the same way as the one found in Resonite. This means that you can use the "+" and "-" modifiers to include or to exclude certain tagged worlds. Searches are initiated by pressing the Enter key or by pressing the magnifying glass icon. The magnifying glass is the same SVG from the press kit; this SVG has been modified in the same matter as the Featured Ribbon one.

image

Paging Controls for World Browsing

A pagination component is provided at the end of the page to show the current result number and to provide the ability move forward or to move back between results. Results are currently restricted to 20, but this can be tweaked either by modifying the default max or by including a future control for the user to specify the result size. The Previous and Next buttons have a disabled state that is apparent to the user.

image

Other Notes

  • Pagination, Search Box, SVG, and Button components are created as mixins so that they can be used in other parts of this small application. The Pagination and Search Box components can be used for session searching.
  • The world description is using line-clamp, specifically -webkit-line-clamp, that is considered supported on all major browsers. There seems to be confusing information regarding its availability, but it is working correctly.
  • The current routing logic (such as preprocessing the worlds and session and including other metadata required for rending the page) is starting to look bloated by including page type checks. It might be best to refactor this part, which this might be something the author might be planning to do.

Resolves #17

@ProbablePrime
Copy link
Member

This is looking great!

I see lots of design decisions being made and that's ok. We'll likely re-unify any of those decisions after the PR.

I've been thinking about more long term structure too, but essentially for now, just continue!

@stiefeljackal
Copy link
Contributor Author

Thank you for the comment, @ProbablePrime.

I see lots of design decisions being made and that's ok. We'll likely re-unify any of those decisions after the PR.

No problem! I am just showing what is possible and providing a different option for the search portion based on some examples of search results pages I looked at.

I've been thinking about more long term structure too, but essentially for now, just continue!

Page and URL structure, look and feel structure, project structure, or all of the above?

@ProbablePrime
Copy link
Member

ProbablePrime commented Dec 5, 2024

Pretty much all up.

I built this very quickly and generally like my strategy for micro sits of keeping things simple. The features we're adding make sense though. So I just want to do some cleanup once we have session and world viewing working.

I've been looking for an excuse to use https://htmx.org/ too, and this might be that.

But basically anything other than React lol :D

@@ -0,0 +1,9 @@
include svg.pug
Copy link
Member

Choose a reason for hiding this comment

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

Oh heck yeah, includes! Good job!

@stiefeljackal
Copy link
Contributor Author

Progress was made yesterday to complete the last main item. The "Featured Ribbon" was also added to the individual listing items. I will write a more detailed response after work.

@stiefeljackal
Copy link
Contributor Author

The PR body has been updated with the rest of the information.

@stiefeljackal stiefeljackal marked this pull request as ready for review December 10, 2024 17:23
@stiefeljackal
Copy link
Contributor Author

Rebased.

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.

Simple World Browsing and Search
2 participants