Skip to content

Classify objects#59

Merged
creesch merged 7 commits intomainfrom
classify-objects
Jan 1, 2025
Merged

Classify objects#59
creesch merged 7 commits intomainfrom
classify-objects

Conversation

@creesch
Copy link
Copy Markdown
Collaborator

@creesch creesch commented Dec 31, 2024

@danthedaniel back from the death(backlog)! ;)

  • All favicon related logic now is contained in a class in managers/favicon_manager.mjs
  • Server info is now a class in managers/server_info.mjs
  • Player list is now a class in... you guessed it managers/player_list.mjs

And a few other changes as well that made sense in this context:

  • The querySelectorWithAssertion function is now part of utils.mjs
  • Since this increased the amount of modules it became a bit messy so I decided to organize the modules in a bit of a structure. It is a bit arbitrary but the main point is to avoid one big list of modules.

*/
#hasPing = false;

constructor() {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🥹 it's so beautiful

Copy link
Copy Markdown
Member

@danthedaniel danthedaniel left a comment

Choose a reason for hiding this comment

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

LGTM

* Clear the favicon state and update the display
*/
clear() {
this.#messageCount = 0;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Private variables! I've never use those in JS.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yeah they are quite neat. Relatively recent but old enough that they are supported in any browser of the last few years.

@creesch creesch merged commit 81a51eb into main Jan 1, 2025
@creesch creesch deleted the classify-objects branch January 1, 2025 11:03
creesch added a commit that referenced this pull request Mar 12, 2025
This release contains a variety of new features and improvements.  Things like support for newer minecraft versions, tab complete of usernames, hover events and a bunch more! 

# Main

## New

- Translations are now retrieved per chat message from the game at run time and stored with the message. (#84) Meaning that mod messages will display, messages will show in the language you will have set and that the mod now officially supports **1.21.1 and up** as messages will always have the correct translation for that minecraft version. 
- Support added for the `/tell`, `/msg`, `/w` and `/me` commands. (#82)   Note: This mod is never going to support all commands as this easily can be used for abuse. 
- Click events are now supported (#86)
- Tab completion of usernames (#78)
- Use "Jetbrains Mono" font for chat message/input/player names making it look more like minecraft chat (#80)
- Support for legacy color/format codes and multi-space formatting (#69)

## Fixes/enhancements 
- Make pingPatterns case insensitive (#63) 
- Added aria labels and use semantic elements (#58)
- Hover text now renders similar to in game (#85) and supports color code (#87)

# Technical
- Restructured front-end code to not only be modules but classes (#59)
- Simplify player heads rendering (#70)
- A variety of dependencies has been updated. 

# Various other 
For a complete overview see the [commit history](https://github.com/creesch/minecraft-web-chat/commits/main/)

# Screenshots 
![image](https://github.com/user-attachments/assets/91d4e140-c1a5-4fe2-ab74-9bee12ca0a7a)
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.

2 participants