Skip to content

feat(web-ui): Updated Add / Edit app form to use modals + new Delete App UI flow#5166

Open
Noklef wants to merge 10 commits into
LizardByte:masterfrom
Noklef:add-edit-modal
Open

feat(web-ui): Updated Add / Edit app form to use modals + new Delete App UI flow#5166
Noklef wants to merge 10 commits into
LizardByte:masterfrom
Noklef:add-edit-modal

Conversation

@Noklef
Copy link
Copy Markdown
Contributor

@Noklef Noklef commented May 22, 2026

Description

  • Moved the Add New apps button to the new apps toolbar (left side of the screen)
  • Converted the Add / Edit apps form from the bottom of the screen to a new full-screen modal
    • Allows for nesting of modals as well, so File browser / Cover art modals appear over the Add / Edit modal
  • Added a Delete app modal now instead of browser confirm popup
  • Added delete_title and delete_confirm to the en.json translation file
  • Updated Add / Edit / Delete UI flows to not hard force refresh (now just re-populates via calling the apps endpoint)

Screenshots

image image image image image

Issues Fixed or Closed

Roadmap Issues

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Unit tests have been added or updated for any new or modified functionality

AI Usage

  • None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts
  • Heavy: AI generated most or all of the code changes

Noklef added 9 commits May 22, 2026 11:58
- Wrapped new app button to stick to the left side of the toolbar
- Moved the `Add New` button to the top action bar now (doesn't make sense to keep it at the bottom
- Moved the `Cover Finder Modal` from being nested in the edit form
- Added `OpenEditModal`, `CloseEditModal` functions to control opening / closing of the modal
- Created `ShowStacked()` to allow for modals to be stacked on one-another
  - Currently, only 1 modal will be stacked max, so it's safe to just keep it as a single stack
- Moved some of the modals around so they're not nested within one another and can be created indipendently
- Remove duplicate set of index to `-1`
- Fixed key in for loop not just being the literal string 'i'
- Fixed indenting on the modal
…ser `confirm()` dialogue

- Created Delete confirmation modal
- Renamed `showDeleteForm` to `showDeleteModal`
- Implemented `loadApps()` to wrap the api calling the load apps endpoint
- Use this endpoint when editing / addding / deleting an app (instead of hard refresh)
- Added `encodeURIComponent(app['image-path'])"` onto the end of the covers API fetch to invalidate the cache (and fix a bug with covers sticking around...)
…n name that's being entered

- Cretaed `editModalTitle` function to track the typing of `editForm`'s name property
- Removed trailing spaces as well
…leted application's name

- Switched the translation delete message to the `Component` version, so we can style the `name`
- Added a bottom border to the header, and the background colour
@sonarqubecloud
Copy link
Copy Markdown

}

.modal-header {
border-bottom: 2px solid var(--color-primary) !important;
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.

I like the default border better.

Comment on lines +1721 to +1722
width: 15rem;
max-width: 100%;
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.

I think this is an unrelated change, which is fine, but can you show a screenshot of how it changes?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Originally it was just to shrink the app search bar, since I'm guessing that users won't be typing out entire game names as it filters as you type:
image
image

I might even bump it down to 14rem, that way it doesn't get pushed below the add new button at smaller breakpoints:
image

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.

Maybe combine the magnifying glass and x into one box on the right side? If the field is empty show the magnifying glass. If the field has contents, show the X?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Makes sense, the magnifying glass isn't doing a lot of heavy lifting, I'll combine them

Comment thread src_assets/common/assets/web/apps.html Outdated
<img
v-if="app['image-path']"
:src="'/api/covers/' + index"
:src="'/api/covers/' + index + '?v=' + encodeURIComponent(app['image-path'])"
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.

if this is trying to cache bust, it won't do that 100% because you can reuse the same path even if the image changes

Copy link
Copy Markdown
Contributor Author

@Noklef Noklef May 23, 2026

Choose a reason for hiding this comment

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

Yeah, this was trying to do exactly that.
Went with this route because I'm not really a C++ dev (and didn't just wanna vibe code something up in the back-end to fix this).

I'll revert this and just keep the hard refresh on delete / edit.

{{ $t('apps.cmd_desc') }}<br>
<b>{{ $t('_common.note') }}</b> {{ $t('apps.cmd_note') }}
<!-- Edit / Add Application modal -->
<div class="modal fade" ref="editModal" tabindex="-1" aria-labelledby="appEditModalLabel"
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.

I believe this modal should be full size.

Copy link
Copy Markdown
Contributor Author

@Noklef Noklef May 23, 2026

Choose a reason for hiding this comment

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

Currently it's just following the bootstrap defaults for the modal (largest modal size on bootstrap rn).
By full size, do you mean the width of the app cover container? or the full-window overlay for it.

This is how it currently looks in a maximized window:
image

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.

I think you can use the modal-fullscreen class.

Copy link
Copy Markdown
Contributor Author

@Noklef Noklef May 23, 2026

Choose a reason for hiding this comment

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

I originally had a look at doing that, but it looks a bit goofy if it takes up the entire screen when you open the modal:
image
I personally can't really justify it being full width, since none of the forum fields warrant it IMO.

Realistically, it does already have a modal-fullscreen-md-down class on it (so it will fullscreen when below 768px), although i can bump it up to lg so it'll be in fullscreen at 992px instead. For example:
image
image

(Also looks like the navbar needs fixing on thinner windows 😅 )

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.

That's fine. Let's at least ensure clicking outside the modal doesn't close it, as that would be annoying for users who accidentally click off the modal.

- Removed modal header border
- Bumped down the toolbar group to 14rem
- Removed cache busting in favor of hard refresh
- Merged magnifying glass / clear text `X` icon for search on the right side
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