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

Modpack fixes #293

Merged
merged 6 commits into from
Jul 20, 2020
Merged

Modpack fixes #293

merged 6 commits into from
Jul 20, 2020

Conversation

HebaruSan
Copy link
Contributor

@HebaruSan HebaruSan commented Jun 26, 2020

This pull request attempts to make mod packs somewhat usable, plus a few convenience/usability fixes.

Problems Changes
If you click Login to log in, you have to click the Username field to start typing. Now the Username field has focus by default.
A mod box shows the game version, but not the game. Now the default version, game, and game version are shown, which fixes #172.
If you have no forum name, twitter name, reddit name, irc name, or description, your user profile will have a blank box at the top. Now the blank box is not shown.
The admin page doesn't say which users are admins Now an Admin column shows who's an admin
The user profile doesn't say whether the user is an admin or allow an admin to make them an admin Now admin-visible section of the user profile shows whether they're an admin, and a "Grant Admin" link allows admins to set non-admins to be admins
The list of mods for a given game shows all mods you follow regardless of game. But only if there are 3 or more. Now only followed mods for the current game are shown. And we show them all, even if you only follow 1 or 2 mods.
If you create a mod, you're taken to the view-only page for that mod and have to click Edit Mod to fill in the details. Now after you create a mod, you are taken directly to the mod editing page.
If you create a mod pack, you're taken to the view only page for that mod pack and have to click Edit Mod Pack to start adding mods. Now after you create a mod pack, you are taken directly to the mod pack editing page.
Mod packs are shown only on user profiles. Now a "Browse Mod Packs" link is available at the bottom of each game's mod list, which goes to a new /packs/gameshort route that shows a paginated listing of mod packs, 15 per page (half as many as for mods, since they're twice as wide). To make sure this is fast, ModList.created is now indexed.
Adding a mod to a mod pack is confusing; you can type a mod's name and click Add Mod and nothing happens. Now the Add Mod button is disabled until you click a mod in the dropdown, which is what allows the page to get enough info to add the mod, and a tooltip in the disabled state tells the user directly to interact with the dropdown. This fixes #158.
It may not be clear why a mod shows up in the dropdown when trying to add a mod to a mod pack. Now while you type, the matching parts of each mod name are bolded.
The page to view a mod pack looks weird, each mod is shown with a long horizontal box that is not shown anywhere else on the site. Now the standard mod box is used. To avoid losing functionality, the Follow/Unfollow and Download links are added to the standard mod box, which fixes #103 and fixes #160 and fixes #161. The long custom boxes are still used for editing because I did not want to try to make the up/down/remove buttons fit on the standard box, maybe later.
It is possible to add mods from any game to any mod pack. Now you can only add mods that are for the game associated with the mod pack, which is displayed more prominently on the mod pack viewing and editing pages in case the user wonders why he or she can't find a particular mod.
You can add the same mod to a mod pack multiple times. Now you can only add each mod once.
Mod pack mods loaded from the server have a different background than mods generated on the client. Now they both use the blurry blue thing.
Mods shown in a mod pack always report the game name as "KSP" even if it's something else. Now the actual game name is used.
Mod entries generated on the client show the game version as "undefined", and when editing, mods loaded from the server don't show a game version at all. Now it uses the default version's game version.
The up and down arrows for moving mods in a mod pack don't work at all for client generated entries (you're taken to some other page), and are glitchy for server-loaded mods. Now they work as intended, and the 'X' in the middle is replaced with a trash can on the far right.
The description text editor for a mod pack is gigantic, far beyond any reasonable length that might be needed. Now it's one-third the previous height, which can still comfortably fit a fairly verbose paragraph.
The view only page for a mod pack shows the user name, but it's not clickable. Now it's a link to their profile.
If you click "Delete Pack", the pack just goes. Now a confirmation modal dialog appears to ask for confirmation.
The mod pack mod search field retains the name of a mod you just added after you add it, so you have to delete it to add more. Now the field clears when a mod is added.
The mod pack creation page has a copy of the CKAN checkbox show/hide code with hard-coded game ID, but it doesn't have that checkbox. Now this code is removed.
Listings of mod packs (on the profile) show each pack's description, but it overflows out the bottom of the box. Now the description fits inside the box.

Screenshots

Default focus of login:

image

Mod pack deletion confirmation:

image

Admin column in user list:

image

Admin indicator in profile:

image

Grant admin confirmation modal:

image

Mod selection bold highlights:

image

Add Mod button enabled after mod selection:

image

Mod version and game name in thumbnail, download link on hover, mod pack link at bottom (not logged in):

image

Same logged in:

image

Mod packs for a game:

image

Contents of a mod pack (not logged in):

image

Contents of a mod pack, follow link in thumbnail hover (logged in):

image

Editing mod pack with reasonably sized description:

image

@HebaruSan HebaruSan added Type: Bug Type: Improvement Area: Backend Related to the Python code that runs inside gunicorn Priority: Normal Type: Feature Status: Ready Area: Frontend Related to HTML, JS, CSS, or other browser things labels Jun 26, 2020
@HebaruSan HebaruSan force-pushed the fix/modpack-add branch 2 times, most recently from 4774455 to 792f68e Compare June 26, 2020 08:46
@HebaruSan HebaruSan added the Area: Migration Related to Alembic database migrations label Jul 11, 2020
Copy link
Member

@DasSkelett DasSkelett left a comment

Choose a reason for hiding this comment

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

Nice, good work, thanks! Maybe the packs get more attention in the future now that they're working better.

@HebaruSan HebaruSan merged commit ac7b6e2 into KSP-SpaceDock:alpha Jul 20, 2020
@HebaruSan HebaruSan deleted the fix/modpack-add branch July 20, 2020 23:34
@DasSkelett DasSkelett mentioned this pull request Oct 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Backend Related to the Python code that runs inside gunicorn Area: Frontend Related to HTML, JS, CSS, or other browser things Area: Migration Related to Alembic database migrations Priority: Normal Status: Ready Type: Bug Type: Feature Type: Improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants