GithubHelp home page GithubHelp logo

thatsmybis / thatsmybis Goto Github PK

View Code? Open in Web Editor NEW
30.0 6.0 33.0 3.51 MB

A tool for loot council guilds - easily keep track of your raid's loot distribution

Home Page: https://thatsmybis.com

License: Other

PHP 37.08% CSS 6.51% JavaScript 10.40% SCSS 0.01% Blade 45.98% HTML 0.02%
gaming wow-classic classic-wow loot-council raid-management php laravel javascript mysql discord-server

thatsmybis's Introduction

CircleCI Build Status

That's My BIS; a tool for loot management in World of Warcraft Classic

This project was started to give raiders a stronger voice in how loot council distributes loot, help loot council make more informed decisions, and to provide transparency in decision making back to raiders.

In general, decisions made in the development of this project should reflect those objectives. Features that may obfuscates actions and needlessly hide data from raiders should only be implemented with careful consideration, as they may harm the overall objective of this project.

We want to lessen the gap between raiders and raid management, not increase it. Raid management is there to support everyone else in the raid, not act above them.

Some Technical Details

If you have any questions, reach out on the project's Discord server: https://discord.gg/HWNUMKK

Stack:

  • Linux (server is running Ubuntu)
  • PHP 8.0 (Laravel is the framework)
  • MariaDB (almost 1:1 identical to MySQL)
  • Nginx
  • Javascript (jQuery, DataTables library)
  • CSS (Bootstrap 4)

Laravel Docs. Laravel dictates the file structure of the project and how almost everything is implemented, so they're very useful.

Environment variables are stored in .env. These will generally need to be configured when setting up a new environment, and an existing dev can assist you in populating them.

Composer will need to be run (composer update, composer install) when setting up a new environment. Composer is the PHP package manager used in this project.

The list of routes and what controller functions they map to are located in routes/web.php, or routes/api.php for API endpoints. These files are a good place to start for learning how to navigate the project for the first time.

Models are located in the app directory.

Controllers are located in the app/Http/Controllers directory.

Views are located in the resources/views directory.

Helper functions are loaded in from app/helpers.php and accessible almost anywhere when writing PHP.

Similarly, there are Javascript helper functions stored in public/js/helpers.js.

The 'master' template for all page views is views/layoutes/app.blade.php. All other pages use this template, populating the 'content' section at the very least.

Node Package Manager AKA 'npm' is used for the Javascript package management in this project. (run sudo npm install --global cross-env if you have an error about cross-env not being found when you run one of the npm scripts)

Javascript and CSS goes through a preprocessor/transpiler before being used in production. These files are stored in public/js/processed and public/css/processed (though this may change if someone implements a more dynamic system). These are not currently (2020-08-12) generated server-side, but rather need to be generated by the developer before merging into master. Generate them with npm run production from the root folder.

The restcord package is being used for accessing Discord's API. As of 2021-09-21, we are using the dev-develop branch of restcord and not a proper version number. This is because only dev-develop supports guzzlehttp ^7.0, which is a requirement for upgrading to Laravel 8.0.

Caching

Redis has been chosen for caching. The CACHE_DRIVER environment variable will need to be configured appropriately for this to be taken advantage of.

You should install and use the phpredis PHP extension. Alternatively (say; in a dev environment) predis/predis can be added with Composer. It is written in PHP, and it is far slower thhan phpredis, which is written in C.

The genealabs/laravel-model-caching package is also in use. Its implementation is primarily seen at the top of classes with use Cachable;. This caches eloquent queries, handles automatic cache invalidation, and caches models.

Cache Busting

Some pages allow for certain elements to be cache busted. To bust the cache, pass the b=1 parameter in the url. The SeeUser middleware will check for this, and set a variable for cache busting to true. Certain controller elements will check for this variable before loading from the cache. If it's set to true, it will bust the cache on that specific bit that it wants to fetch before fetching it.

This feature isn't 100% implemented everywhere, so the cryptic name b has been opted for. Otherwise some users would see bust or bustCache, and expect everything to get busted all the time. They may then become confused or annoyed when it doesn't work.

Translations

Translation files are exported using kkomelin/laravel-translatable-string-exporter.

  • Translation strings are stored in resources/lang/
  • The list of supported translations are in app/helpers.php:getLocales()
  • Use php artisan translatable:inspect de (replace de with whatever language code you want) to see what strings in the translation file still need to be translated.
  • Use php artisan translatable:export cn,da,de,en,es,fr,it,ko,no,pl,pt,ru to update the translation files with all of the strings that the parser can find.
  • For getting people to translate stuff, I've just been putting the translation files up in Google Sheets and giving people edit access, then importing it back into the repo (some parsing required).

Warcraft Logs

Guilds may connect a Warcraft Logs account to their guild. They may also specify a Warcraft Logs Guild ID to associate with their TMB guild.

Within the code in this repo "Warcraft Logs" is written as one word: warcraftlogs, Warcraftlogs, or WARCRAFTLOGS depending on the context.

PHP 7.4 > 8.0 Upgrade Notes

This project was originally written in an early version of PHP 7.4. To upgrade to 8.0, I performed the following (you may need to install additional packages php-* and change the nginx configuration based on your environment, or if you are using Apache instead of nginx):

sudo apt update
sudo apt upgrade
sudo add-apt-repository ppa:ondrej/php
sudo add-apt-repository ppa:ondrej/nginx
sudo apt update
sudo apt upgrade
sudo apt install php-curl
sudo apt install php-fpm
sudo apt install php-mysql
sudo apt install php-mbstring
sudo systemctl status php8.0-fpm
sudo a2enmod actions fcgid alias proxy_fcgi
sudo nano /etc/nginx/sites-available/thatsmybis.local
    > fastcgi_pass unix:/var/run/php/php8.0-fpm.sock
sudo systemctl restart nginx

You may need to copy over some custom configs to php8.0-fpm (/etc/php/8.0/fpm/php.ini), such as max_input_vars as defined elsewhere in this readme.

phpredis Installation

Option 1

  1. apt install php-redis
  2. apt install redis-server

I required phpize, so I ran sudo apt install php8.2-dev (adjust for you version of php).

You may need to run sudo apt install igbinary.

You may need to add the following to your php.ini or php-fpm.ini:

extension=redis.so
extension=igbinary.so

Option 2

This worked on my local environment, but not on the production server:

  1. pecl install redis
  2. enable igbinary serializer support? > yes (it uses far less memory)
  3. enable lzf serializer support? > no (I have no idea what this does)
  4. enable zstd serializer support? > no (I have no idea what this does)

I required igbinary, so I ran sudo pecl install igbinary.

After installation, run redis-server to test that you can run an instance of the server.

Run sudo systemctl enable redis-server to tell the server to boot on system startup. If you're getting a connection refused error in the app, it may be because the Redis server isn't running.

Local Environment Setup

The easiest way to get a local envrionment setup is with Laravel's configuration for Vagrant. Vagrant is a tool that makes it relatively painless to spin up a virtual machine containing a standardized dev environment for a specific project. This means that rather than configuring your operating system to have the appropriate packages, webserver, databases, and other requirements for this project, you just download and boot up a virtual machine that already has all that crap set up. This allows many developers to run the same dev environment, reducing troubleshooting and headaches, and putting more focus on the project itself.

Now, there's still going to be a little bit of work and learning curve involved in getting that VM setup. But believe me, it's better than the alternative.

Laravel has a custom environment for Vagrant. They call their environment 'Homestead', and that's what we're going to be setting up. It's easiest to get this up and running on Linux, but it's not much more work to get it running on Windows.

Best place to start? RTFM: https://laravel.com/docs/8.x/homestead

tl;dr

  • Download and install VirtualBox: https://www.virtualbox.org/wiki/Downloads

  • Download and install Vagrant: https://www.vagrantup.com/downloads.html

  • Download/clone the laravel/homestead repo, run bash init.sh (or init.bat in Windows), configure Homestead.yaml

  • Generate .ssh keys or use the ones you have. (In Windows: ssh-keygen -t rsa -C "[email protected]")

  • A Windows configuration for Homestead.yaml looks like this:

    ---
    ip: "192.168.10.10"
    memory: 2048
    cpus: 2
    provider: virtualbox
    
    authorize: C:\Users\your_username\.ssh\id_rsa.pub
    
    keys:
        - C:\Users\your_username\.ssh\id_rsa
    
    folders:
        - map: C:\projects\thatsmybis
          to: /home/vagrant/code/thatsmybis
    
    sites:
        - map: thatsmybis.local
          to: /home/vagrant/code/thatsmybis/public
    
    databases:
        - thatsmybis
    
    features:
        - mariadb: false
        - ohmyzsh: false
        - webdriver: false
    
    # ports:
    #     - send: 50000
    #       to: 5000
    #     - send: 7777
    #       to: 777
    #       protocol: udp
    
  • Make sure the hosts have been setup (read Hostname Resolution in the docs)

  • Run vagrant up while in the Homestead directory.

  • Run vagrant ssh

  • Run composer install from /home/vagrant/code/thatsmybis

  • Create a file named .env in /home/vagrant/code/thatsmybis. Base it off of .env.example or ask another dev for what details to fill in.

Getting the The server requested authentication method unknown to the client error after spinning up Homestead?

Try running this in MySQL on your local environment: ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'secret';

Items Table

The items table must be populated manually once your database is up and running. (create the database by running php artisan migrate once your environment is ready and you've already created your the empty database in mysql)

Find these insert statements in the DB repo: https://github.com/thatsmybis/classic-wow-item-db/tree/master/thatsmybis

Run the raw SQL from these files in mysql (in this order):

  1. Insert items.
  2. Insert instances.
  3. Insert item_sources.
  4. Insert item_item_sources.

Permissions

kodeine\acl library was used for the permissions.

NOTEWORTHY: That library expected the User model to be the one with the roles and permissions. We did not use the User model. We used the Member model. Because of that, some references to 'user' or 'user_id' might not make any sense whatsoever. Have fun with that. I sure did. /s

ALSO: There's an override. The CheckGuildPermissions middleware will flag someone as a SUPER ADMIN if they're the guild's owner in the DB or (if I implement it), if they're one of the devs. the hasPermissions() function in the Member model will allow this flag to override the normal permissions. Science!

Roles

Roles are loaded from the Discord server.

Custom Configurations

  • ONLY_FULL_GROUP_BY for SQL has been disabled in database.php by changing strict to false. This is to allow for writing simpler GROUP BY clauses in queries. If you can fix the group by complications caused by strict, you're welcome to turn it back on. I tried. It required mutilating my SELECT statements, and even then I couldn't get it to 100% work the way it did before 5.7 when it just assumed ANY_VALUE() on non-aggregated columns (even when I told it to use ANY_VALUE()). Good luck. (SO thread)
  • max_input_vars in php.ini (PHP's config) has been increased from 1000 to 6000. This is to support some pages with an absurd amount of inputs. (ie. 120 items with 20 input fields each = 2400 inputs)

Adding An Epxansion

Expansions may need to be added. Follow these steps to do so:

  1. In helpers.php, update getExpansionColor() and getExpansionAbbr()
  2. Update resources\views\partials\item.blade.php
  3. Update characterDatatable.blade.php
  4. Update characterStatsDatatable.blade.php
  5. Update expansion classes in main.css
  6. Update app.blade.php, change @if (isset($guild) && $guild->expansion_id < 4) to use whatever expansion ID is the latest (to let people know they can use that version...)
  7. Update nav.blade.php
  8. Update epxansionDatabases.php
  9. Update wishlistStats.php
  10. Update resources\views\item\show.blade.php
  11. Update resources\views\character\edit.blade.php if expansion supports Vanilla-style PvP ranks.
  12. Update resources\views\character\loot.blade.php
  13. Update resources\views\character\massEdit.blade.php if expansion supports Vanilla-style PvP ranks.
  14. Update rosterStats.js ADD NEW INSTANCES HERE
  15. Update Character.php... check classes, races, professions, specs,
  16. Update Guild.php to choose max level for expansion.
  17. Update AdminController.php... current functionality is only for a developer helper function.
  18. Update ExportController.php
  19. Update ItemController.php
  20. Update showWishlistStats() in LootController.php
  21. Update home.blade.php

If there are any tokens that have duplicates across both factions but share the same rewards, probably one of them should be deleted and one preferred for our system. If this is done:

  1. Update assignLoot.js (see // Convert item ID to the ID that we use comments in that file)

This project started with just Classic. Later, TBC was added, followed by WoTLK. As of this writing, Season of Discovery is being added, and Cataclysm will likely be added afterwards.

Docker

Docker Compose Local Development Environment

Note: Docker was added by a contributor and is not maintained by the primary developer. Its config is probably out of date.

The laravel development environment can be bootstrapped by utilizing the bitnami laravel docker images to stand up laravel and mariadb.

Requirements: Docker Desktop

In the root of the project directory, there is a file called docker-compose.yml. This file contains the configuration for standing up the development environment. When the image starts, it is mapping in the the directory and sub directories of where it is located.

Run this in the root of the project to start the environment:

docker-compose up

This will run through and restore all of the project dependencies, start mariadb and the application and run the migration scripts.

Once Complete the following line will be printed:

 Laravel development server started: http://0.0.0.0:3000

This is a bit misleading as we have modified the docker-compose file to use port 80 instead of port 3000. Just remove the port and you should be able to load the page.

There is still a requirement to insert all of the items, instances, item_sources and item_item_sources from the db project. See section Items Table above.

Note: You can insert the items table by doing two things.

  • You can connect to the container through docker and run commands inside of it. Example: docker exec -it <container-id> bash

  • You can download a database management suite and connect to it to manage it. Example: MySQL Workbench, Adminer etc.. The connection endpoint will be localhost:3306

In order to see what containers you have running you can run docker container ls

Example Output:

CONTAINER ID        IMAGE                            COMMAND                  CREATED             STATUS              PORTS                    NAMES
56196af43aea        bitnami/laravel:7-debian-10      "/app-entrypoint.sh …"   26 hours ago        Up 5 minutes        0.0.0.0:80->3000/tcp     thatsmybis_thatsmybis_1
463541b65e80        bitnami/mariadb:10.1-debian-10   "/opt/bitnami/script…"   2 days ago          Up 5 minutes        0.0.0.0:3306->3306/tcp   thatsmybis_mariadb_1

Docker Development with Visual Studio Code

A quick an dirty way to develop is to use Visual Studio Code with the PHP plugin which does intelisense and syntax highlighting. The laravel app will most times pick up the changes immediately if you refresh the page.

Docker Development Laravel Development Commands

Commands can be launched inside the thatsmybis Laravel Development Container with docker-compose using the exec command.

Note:

The exec command was added to docker-compose in release 1.7.0. Please ensure that you're using docker-compose version 1.7.0 or higher.

The general structure of the exec command is:

$ docker-compose exec <service> <command>

, where <service> is the name of the container service as described in the docker-compose.yml file and <command> is the command you want to launch inside the service.

Following are a few examples of launching some commonly used Laravel development commands inside the thatsmybis service container.

  • List all artisan commands:

    $ docker-compose exec thatsmybis php artisan list
  • List all registered routes:

    $ docker-compose exec thatsmybis php artisan route:list
  • Create a new application controller named UserController:

    $ docker-compose exec thatsmybis php artisan make:controller UserController
  • Installing a new composer package called phpmailer/phpmailer with version 5.2.*:

    $ docker-compose exec thatsmybis composer require phpmailer/phpmailer:5.2.*

thatsmybis's People

Contributors

daeke avatar gitapo avatar jmwaldrip avatar lemmings19 avatar moongl4de avatar nghedi avatar papa-smurf avatar pyrodius0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

thatsmybis's Issues

Don't let members remove items from characters that raid leaders or officers added

Currently characters can remove any and all items assigned to their characters. Change it so they can only remove items they themselves added, otherwise require higher permissions.

This will also require adding in UI elements to indicate who assigned the item, so as not to be confusing.

Will require adding a new permission type.

Add an indicator as to whether or not a character is an alt

Some guilds will want to know if a character is an alt. These guilds typically prioritize mains over alts in many scenarios, and this is especially popular early on in a realm's lifecycle.

This could be done by adding a boolean to the database table for characters, a checkbox when editing a character, and some kind of indicator everywhere that character is displayed.

While I personally believe that this is invalid most of the time, as a character's raid group should be used to determine their eligibility (even if it's an alt, if it belongs to that raid permanently, it should get fair access), I see the arguments for adding this in anyway.

Add filters to audit log

Put these filters up at the top of the page, similar to where they appear on the roster and loot list pages.

The controller's queries are already set up to handle this filtering, but some validation will need to be added.

This is a medium priority feature.

It's a good first issue because it doesn't involve looking at or modifying very many files. Just a single view, and a few lines in a single controller method.

Add officer note to items

These notes would work the same way that character and member notes work.

Would need to add an input+display for this on the item page, item list page, and item notes input page. Would need to add permissions checks to ensure only certain users can see them, and only when Streamer Mode is not on.

Will also need to insert some new permissions rules into the database.

As a first issue for a new contributor, this one touches a good handful of concepts/features on the website, but isn't technically that complicated.

Add feature to undo mass item assignments

Maybe add a batch field to character_items. When assigning lots of loot at once, apply a batch value equal to the guild_id + microtime(). Record this in the audit logs, and add an undo feature available to the GM and possibly officers.

Add support for guild-managed granular permissions

Much like you can control what roles have what specific permissions in-game in a guild, it would be nice for this project to support the same level of granularity.

This is a longer-term goal/feature request.

Change the item input styles when assigning loot.

Currently the Assign Loot page re-uses an existing style for a multi-input. Change this to be more suitable for a single input.

Ideally, I'd like the input to disappear and be replaced with the item, colored and icon'd appropriately.

Current behaviour:
image

This is a good first issue as it only deals with some javascript and styling. No understanding of the back-end system is needed.

Players sometimes add quest rewards to their wishlist rather than the actual quest items they need out of raids.

This is listed as a good first issue not because it's a quick one, but because the logic should be relatively straightforward. @Lemmings19 has ideas for how we should and should not solve this, so ask him about it first.

Say I want Avenger's Legguards, and I put them on my wishlist. They require Skin of the Great Sandworm from AQ40 to obtain.

When loot council is looking at Skin of the Great Sandworm, it won't show my wishlist item. Can we design and add a system that gracefully solves this mistake, or helps users avoid it?

This is a good first issue because it provides some opportunity to investigate different solutions and how they might impact the system. The proposed solution in the comments is a fairly simple one that only exists on the front-end and doesn't require knowledge of how the rest of the app works.

Add feature to undo assigning loot so that it goes back onto a user's wishlist

When you assign loot via the 'raid time' page, it will automatically pop that loot off a character's wishlist. It might be possible to add an undo feature that will both remove that item from the character's loot received, and add it back onto the wishlist.

This isn't super high priority though, as it can be done manually already.

It would also mean adding more stuff to the UI, which I want to avoid if it's not an important feature.

Blacklist certain items from being wishlisted

Many guilds will want to reserve certain items that are distributed solely based on loot council's decision. Super rare or important items like Thunderfury bindings or perma-bis items.

These guilds might want to prevent their users from adding items to their wishlist that don't really count, thus wasting a slot.

While I agree with the premise, I don't think we need to handle this on our end. These guilds can communicate this information to their raiders. I also don't see a clean way to implement this.

Allow raid leads to order characters by priority for any given item

For each item in an instance, leadership should be able to set a list of characters waiting in line for that item, and in what order those characters are.

This will require changes to the database, models, controllers, and views.

This is a high priority task, as it has been requested several times and makes sense to add.

Rather than removing an item from a wishlist when it is assigned, toggle that item as 'received' and leave it in the wishlist.

It would be nice if items received were left on the wishlist, but striked out.

Add a flag to the wishlist item. Hide that wishlist item throughout the site, but still display it when viewing the character, just with a strikethrough.

However, this would also preserve the user's old wishlist ordering. It doesn't make sense to me that the majority of users on the website would like for their old wishlist ordering to be preserved. If their top item is received, their second item should now become their top prio.

Figure out what the solution to this should be before implementing.

Original request: https://discordapp.com/channels/732998376798552210/733019346649088121/751108835795796018

Add offspec/OS flag when assigning loot or wishlist items

Users want to know whether an item given/received/wishlisted is/was an offspec piece.

I'm thinking that we simple need to add a boolean/checkbox beside each item input for wishlists, loot received and the 'raid time' page.

This will require updating the database, models, controllers, and many of the views.

This one will affect the UI throughout the site, as we'd need a good way to display this information without it appearing cumbersome. We really want to keep the UI as clean as possible, and avoid clutter. Too much text makes things hard to scan.

Add attendance tracking support

Add features for tracking raid attendance and displaying that attendance throughout the website.

  • Decide if attendance will be broken down by pulls, bosses killed, or raid count attended (with the option of the officers to assign a float of their choosing; 1.0 being full attendance for that raid).

  • Draw mockups for the attendance input page.

  • Draw mockups for the attendance display page (single raid and raid list).

  • Rename/refactor raids to raid_groups.


  • Make page+functionality for creating attendance/raid.
  • Make page+functionality for editing attendance/raid.
  • Make page+functionality for copying attendance/raid.
  • Make page for viewing attendance/raid.

  • Feature for guilds to toggle attendance feature on/off.

  • Show attendance stats beside characters.
  • sum(attendance) as well as sum(attendance)/sum(was_expected)?
  • Show on character page.
  • Show on member page by characters.
  • Show member average attendance on member page?
  • Show member average attendance on member list page?
  • Show on roster page beside characters.
  • Show on loot page beside characters.
  • Show on prio assignment page beside wishlisted items.

  • Show detailed attendance breakdown on character page.
  • Show detailed attendance breakdown on member page?

  • Show an overall attendance breakdown table, filterable by raid and class. Member and Roster pages do this.

  • Create a raid table & model.
  • raid_characters table should have columns similar to attendance (float 0.0-1.0) (pulls present for divided by pulls the raid made?), was_expected, is_trial(not sure if we need this one), raid_group_id (to indicate if they belonged to a different group at the time?), character_id.

  • Take into consideration how imports will work and what the import format might look like.
  • Add permission for editing raid groups (different from editing raids)

For a later release?

  • Make sure new API endpoints are secure.
  • Create a feature for linking batches, raid groups, instances, characters, and items to raids.
  • Create a page for listing batches. (show batch name, # items assigned, raid group name, date submitted)

Branches:

  • Merge/deploy first: #131
  • Merge/deploy second: #132
  • Update production .env with cache variables.

Rare Recipes Filtered by Selected Professions

It would be nice if the Rare Recipes field under the Profile -> Loot -> Rare Recipes field was filtered by the professions that were selected for the character. Making it easier to see the items you want for your professions.

Allow wishlists to be locked by officers

One guild requested this, as they want their members to be able to edit their wishlists before a raid/season/phase starts, and not be able to modify them afterwards. There could be other uses for this as well.

For the time being, users can make use of the audit log and item timestamps to detect users tampering with their wishlists.

This could also get more complicated when you consider that you won't necessarily want the whole guild's wishlists on lockdown, but rather on a raid-by-raid basis.

Priority inputs' wishlist/received info not showing all data.

Note how the data on these two screens does not match up. This was submitted by a user, and I haven't tried duplicating it yet. My local environment has two people wishlisted for a single item and they both show up. Not sure what's wrong here. Maybe an issue with the query?

image
image

Officer notes can't always be set to null

Performing the check if ($currentMember->hasPermission('edit.officer-notes') && request()->input('officer_note')) will return false if the officer note is empty, and it won't actually update the value.

Check to make sure there aren't any other problems preventing the note from being nulled out.

Add duplicate prevention to item imports/assignments.

When importing items, maybe grab a unique field from the import, put it in a hidden (or visible?) field, and store it in character_items. Only insert that record if the unique ID isn't already in the DB. Maybe add a checkbox in the import section that allows people to turn duplicate protection on/off.

For RCLC, this field is id.

Show what rank someone's wishlist item is on the item list page

This should be pretty simple as the value is stored alongside the item in the character_items table in the column order. The harder part will be coming up with a good way to add it to the UI without it looking messy/distracting. Maybe a muted colour that blends in and will only be noticed if you look a little harder.

This is a good first issue because it should only require editing a bit of javascript. Possibly modifying the columns selected in a query, possibly joining a new table in a query. (if you're having difficulty finding the value, check the parameter/array/value/child labelled 'pivot' if it exists)

Character name validation is allowing null. It shouldn't do that.

Change this rule to require a value. Note that the validation gets reused across a few pages, so check where it's used and update each page with its own validation. Some pages like character notes don't even need a name but re-use some of the validation rules, so allowing for null there is fine.

Probably just take 'name' out of the grouped validation rules and provide each page/endpoint with its own custom rule for name.

Edge case prevents roles from getting appropriate permissions.

Scenario:

  • I set role 123 to both GM and Officer level. It gets permissions for both.
  • I remove role 123 from Officer level.
  • Role 123 now has neither Officer nor GM permissions.

This is happening because the current logic will strip a role of all permissions when it is removed from a ranking. It should instead only lose the permissions relevant to that ranking.

https://github.com/thatsmybis/thatsmybis/blob/master/app/Http/Controllers/GuildController.php#L269

The logic needs to be updated to consider assigning the same role to multiple levels of permissions.

On the item page show loot a player has received for that item's slot and loot they've received from that item's instance.

It may be useful for loot council to quickly and easily see what loot a player has received for any given item slot (eg. what chest pieces they've received), and also what loot they've received from any given dungeon/instance (eg. naxx).

The image below should explain what this would look like:
image

One caveat is to not introduce too much data/information as to overwhelm smaller screens. Perhaps have the columns hidden by default.

Related to #128

Character and member names with forward slashes are breaking pages.

The pages for viewing members and characters escape most of the characters in a name, but aren't escaping slashes. This is causing an invalid URL and a 404.

Short term fix: Make sure slashes are escaped.

Long term fix: Implement slugs for character and member pages.

A slug is when a name is changed to be more friendly to the system. For example "My Friend's Party" becomes "my-friends-party"

Add user specific notes to items

Is this even worth doing? Does it meet our UI/UX requirements of keeping things simple and to the core requirements?

The same way that guilds can add notes to items, some users would like the ability to do this as well. Their note would be shown when browsing an item's page, alongside their public note.

Here's a demo of what the feature could look like in use:
image

Add quick filters to the Audit Log page

Filters exist, would just be nice to have them quickly accessible in nice dropdowns at the top of the page rather than having to hunt around for the thing you want to filter by.

Group item assignments into a specific raid or date grouping

When assigning loot from a raid, it would be useful to associate that loot with the raid it was received/given in. So if a group clears AQ on Tuesday, August 11th, any loot given during that raid should be linked to that clear.

We don't necessarily have to implement a super-robust page for displaying this relationship in this PR, but we want to at least lay the structure and functionality that would support it.

This one will probably require a bit of planning before implementation.

One catch on the UI side of things is that we'd have to add a way to retroactively assign an item to a past raid. That would probably mean some kind of a lookup for past raids, a new input field, etc. If we add too many input fields beside item entries, things will get cluttered. We might consider collapsing/hiding this new input until the user wants to show it/use it.

Add a character specific audit log page

This isn't a super important page, as once we've added filters to the audit log page, this is already kind of done elsewhere. Even so, it wouldn't be a bad feature to have.

Make a new page, probably just re-use the audit log controller's logic but prefill the character filter.

Indicate how long since a character last received loot

When viewing a character who has wishlisted an item, it would be useful to see how long it's been since they last received any piece of loot.

We already have a different feature to show how long since they received a specific item or wishlisted an item, so we already capture dates associated with those. It shouldn't be too difficult to modify some queries to join a table or two and fetch the most recent date on items received.

One caveat is that this feature only works if people's Loot Received section is up-to-date. Even so, it could be a good feature to add.

Probably show this information in a tooltip to start. Maybe later on, we could start highlighting players who haven't received an item in a long time, but only if it's necessary to go that far. Doing that preemptively would probably be adding extra visual noise that we're not sure if we actually need. Many guilds might not find it beneficial, but rather simply distracting if their data isn't well maintained.

Setting to change ordering of items and amount of displayed items

When distributing loot based on priorities of items (wishlist item 2 > 5) it is currently challenging to quickly assess who has the highest priority due to the alphabetical ordering of characters in certain views (loot & prio view)

Also the limitation of items shown per default (currently only 4 items are shown in various views per and require a click on "show X more items") to display the whole list. This is no problem for a few people but difficult for top items where 15+ people are displayed)

Describe the solution you'd like
An opinion on the guild level that allows to define the ordering logic on the prio and loot views.

Per default, nothing should change. If activated order the characters based on the items index in the characters wishlist.

Another option would be required to toggle the "view X more items" or to display everything per default.

Add caching to Discord API requests.

I just got my first 429 Too Many Requests message today. That means lots of people are loading lots of pages, and our API key hit its limit. We need to start caching the responses we get from Discord and stop making requests on every page.

Currently we ping Discord on every page load, to update a user's roles, verify they're still in the guild, etc.

app/Http/Controllers/HomeController.php:80

$guilds = $discord->user->getCurrentUserGuilds();


There was an error executing the getCurrentUserGuilds command: Client error: `GET https://discord.com/api/v6/users/@me/guilds` resulted in a `429 Too Many Requests` response: 

https://discord.com/developers/docs/topics/rate-limits

Add resource ID's to character, member, and guild pages.

Due to slug generation, sometimes resources with unique names end up getting the same URL, causing a conflict. To avoid this, add a unique identifier for each resource to their URL. The resource's ID is an easy choice.

eg. https://thatsmybis.com/some-guild/some-character would become https://thatsmybis.com/4/some-guild/234/some-character, where 4 is the guild ID and 234 is the character ID.

Add note field to items assigned to characters

Sometimes, it might be useful to leave a note alongside an item when wishlisting/receiving it. We don't have to worry too much about surfacing this note everywhere in the UI when adding this feature. Just add it to the character page for now.

Update the database, model, and view for the character page. Also update any pages/controllers that assign items to characters.

This would be a good first issue as it isn't technically complex. There are existing features that do the same thing that can be used as an example.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.