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

Rework Mods and Saves tabs' context menus #643

Closed
Infernio opened this issue Aug 27, 2022 · 0 comments
Closed

Rework Mods and Saves tabs' context menus #643

Infernio opened this issue Aug 27, 2022 · 0 comments
Assignees
Labels
A-gui Area: GUI (The wx wrapper classes in the gui package) A-usability Area: Usability (UX improvements that benefit everyone) C-enhancement Category: Enhancement, a request to add or enhance a feature M-relnotes Misc: Issue should be listed in the version history for its milestone
Milestone

Comments

@Infernio
Copy link
Member

You now what really doesn't help the first time user experience? Throwing a giant context menu in their face.
Sometimes people report they can't find the Rebuild Patch option even though it's right there - almost certainly because in order to find it, their eyes have to scan through up to twenty-eight menu items.
I sometimes have trouble myself trying to find certain options on the Mods tab's context menu because there's just so much.

So we should do the same thing we did to the Installers tab's context menu and simplify it. Keep the most commonly used options at the top level (Rebuild Patch, Move to, Jump to Installer, Mark Mergeable/Check ESL Qualifications, Add ESM/ESL Flag, etc.) and move all the other stuff to ~two new submenus. Plus a third one for the really weird stuff (Export/Import, Decompile All, Version 0.8).

@Infernio Infernio added C-enhancement Category: Enhancement, a request to add or enhance a feature A-gui Area: GUI (The wx wrapper classes in the gui package) A-usability Area: Usability (UX improvements that benefit everyone) M-relnotes Misc: Issue should be listed in the version history for its milestone labels Aug 27, 2022
@Infernio Infernio added this to the 311 milestone Aug 27, 2022
@Infernio Infernio self-assigned this Aug 27, 2022
@Infernio Infernio reopened this Feb 16, 2023
@Infernio Infernio changed the title Rework Mods tab context menu Rework Mods and Saves tabs' context menus Feb 16, 2023
Infernio added a commit that referenced this issue May 28, 2023
I wanted this release to be smaller for once. 500 commits and nearly a
year later, mission failed :(

Hopefully we'll manage to keep the next one smaller.

All mentioned commits are authored by @Utumno or @Infernio unless
otherwise mentioned.

-----------------------------------------------------------------------

### Fallout 4 (#482, #525, #650)

The first major change in 311 was the beginning of the road towards
proper Fallout 4 records support and hence a fully function Bashed
Patch in FO4.

- 00c9ee8 implemented a key piece of
  the records infrastructure, NVNM. It also dropped some hacks to
  further pave the way. The first two FO4 record types were
  implemented.
- dc6311a refactored CTDA and
  implemented the next seven record types.
- 641bc73 tackled the single biggest
  challenge of the entire undertaking: VMAD. As a bonus, if you enjoy
  rants about stupid design decisions, see
  c5b5d8a. The next ten record types
  were also implemented.
- 28578a6 moved some record types
  that are identical between Skyrim and FO4 to brec and implemented
  the next eighteen records.
- This was immediately followed by
  bb7e5ae, which slightly refactored
  GameInfo.init() but mostly just implemented the next twelve record
  types.
- 3d8b23e implemented nine more
  record types.
- 9bfb6de implemented two more.

Also, @BeermotorWB began the porting process by bringing Tweak
Settings to FO4 in 57b2443.

There are about sixty FO4 record types left to implement. This will be
concluded in 312. I chose this part for the title of the release
("Fallout 4 preparation") since it's what occupied my brain during
most of 311's development.

-----------------------------------------------------------------------

### Python 3 (#618, #619, #644)

Since moving to Python 3 in 310 (see #460), we've been taking full
advantage of everything py3 offers us. Some example commits:

- 8de5f40 cleaned up one of the most
  annoying files to edit, common_subrecords.py.
- cc198c9 shaved hundreds of lines
  off by replacing verbose nested OrderedDict instantiations with
  regular, now-ordered dicts.
- fd1d4d9 took advantage of ordered
  dicts to drop duplication between the records list we used to keep
  track of records in a Mob* class and the id_records dict we used for
  fast random access by FormID. Now we only need the dict.
- In bbb8fa2, @lojack5 used Python 3's
  type annotations to refactor our flags handling.

We also upgraded to Python 3.10 in
7b3573c and to Python 3.11 in
69e7e3a. We also optimized a bunch of
central code for e.g. the BP, FName and Path to take advantage of
changes like 3.11's adaptive interpreter, which gave pretty good
speedups.

We've also been doing what we call 'fdusting' - replacing any random
pieces of code that look like

  a + '.esp'

with f-strings, i.e.

  f'{a}.esp'.

Another (made-up) example:

  'Loaded %d images' % len(images)

becomes

  f'Loaded {len(images)} images'.

This has been happening as a sort of "if you're editing in the
vicinity, fix any you touch" thing, so spread out over tons of
commits.

F-strings are one of the best things about py3 :)

-----------------------------------------------------------------------

### Records (#480, #647)

The eternal #480 rears its head again, as it does every release. First
off, every single merge mentioned in the FO4 section above also falls
under this section.

In addition to that, we are approaching setDefault. Uprooting that
will give us major speed boosts, simplify code, fix lots of random
"the BP is editing this value for some reason" bugs (all of those are
due to defaults), etc. One major blocker was FormID handling (see
section "FormIDs (#637)" below), now cleaned up. Some other commits
related to records refactoring in 311:

- 28e0734 reworked defaults handling,
  making defaults explicit where they are needed and eliminating them
  from most structures in the records code.
- fd1d4d9, already mentioned in the
  "Python 3 (#618, #619, #644)" section above, reduced duplication in
  the record_groups code by getting rid of the 'self.records' list in
  favor of just the (thanks to py3, now ordered) 'self.id_records'
  dict.
- 71520f7 massively reduced code
  duplication in the various games' init() methods and the __slots__
  definitions for all the record types for a total of nearly 1000 LOC
  removed!
- bbb8fa2 by @lojack5, already
  mentioned in the "Python 3 (#618, #619, #644)" section above, took
  advantage of Python 3's type hints to refactor our flags handling.

The biggest merge of this development cycle also falls in this
category. In a truly herculean merge
(d2152aa), @Utumno tackled
record_groups, turning it from a TODO-riddled mess that didn't really
know if it wanted to be Oblivion-only or game-agnostic into a modern
API that will serve us well for the future (e.g. for FO4, which makes
QUST a new top-level group). Seriously, this refactoring was so
complex, its merge has two sub-merges.

-----------------------------------------------------------------------

### FormIDs (#637)

One of the major refactoring goals of 311 was tackling FormIDs. We
used to repesent them as either integers (called "short FormIDs") or
tuples of strings and integers (called "long FormIDs"). Note that the
latter became tuples of FNames and integers in 310 (see section
"FName (#543)" in the 310 release commit.

This was achieved in 4964710, which
is once again an entire branch squashed down to a commit so as to not
break dev. They are now stored as a class instead (brec.FormId). This
required careful engineering and testing to make sure we don't kill BP
performance. For the full story, see the linked commit.

-----------------------------------------------------------------------

### Localization (#55, #500)

We're trying to replace all '%s' specifiers with more useful
'%(something)s' specifiers. This is still nowhere close to being
finished, but 2442285 began the
process. Once this is done, we'll want to rethink how we allow
people to contribute localizations - see #500 for more info.

-----------------------------------------------------------------------

### Epic Games Store & GOG (#646, #648)

No release is complete without adding support for new games, and 311
is no exception. Bethesda released most of their games on GOG and some
on the Epic Games Store, so we added support. See the linked issues
and the referencing commits for more information. The biggest
difficulty was adding support for yet *another* method of game
detection (for the Epic Games Store).

Still to come is refactoring the game detection on the Steam side,
since some of these rereleases will actually overwrite the registry
key used by the Steam versions, making it impossible for WB to
reliably detect the installation of both versions. This will also pave
the way for Proton-based game detection on Linux (see "Linux (#243)"
section below).

-----------------------------------------------------------------------

### Nexus integration (#459)

5e688fd prepared us for proper Nexus
integration, which will be one of the big feature goals of 312, by
merging a nexus.py file that wraps the Nexus API into the source tree
so that keeping it up to date is easier.

-----------------------------------------------------------------------

### FileInfos (#336)

Some refactoring work on FileInfos and related APIs occurred as well,
mostly on the INIs. See 22c8c5e,
2495972 and
b3e4116 for details.

-----------------------------------------------------------------------

### wx (#190)

That's right, more of this.

- 6f2bd1d finally de-wx's the mighty
  UIList (which backs all of WB's tabs) by making it inherit from our
  PanelWin instead of wx.Panel. Turns out it was that easy (I'm sure
  it had nothing to do with the metric tons of refactoring that had
  been done towards this in 310, 309, 308 and 307).
- f7dd4dc decouples us from wx with
  regards to the default, builtin art from wx we used to use. We
  instead now use SVGs (mostly from Font Awesome - don't worry, I was
  careful with the licensing), which also gives us some consistency
  across platforms.
- d1290a5 begins the fight against
  balt.ListBoxes, an absolutely horrible class that not only had a
  really weird API but also featured terrible usability. I wrote a
  mini-novel on this refactoring, see the linked commit. The second
  part arrived later, in 15444ca.
- 6659eb3 features some good old
  de-wx'ing of dialogs for opening/saving/choosing files. Also
  included is some refactoring of status bar-related classes.

-----------------------------------------------------------------------

### Usability (#625, #643, #645, #652, #656)

Back on my bullshit, aka trying to make Wrye Bash more usable.
For 311, we have:

- bfdee3e, which added a Ctrl+S
  shortcut (and matching link for discoverability) to make frequent
  saving easier.
- 47ef378, which aimed to improve the
  INI Edits tab's usability by making it more consistent with the
  other tabs (e.g. adding Alt+Click support, opening tweaks via Enter
  or double click, etc.).
- effcf83, which added links for LO
  undo/redo to improve their discoverability.
- 486a640, which restricted the red
  background color to timestamp conflicts since it kept confusing
  people. See the relevant issue (#656) for some more background info
  on this change.
- 941fb25, which was born out of me
  going "hey, I've never used the Fit Contents and Fit Header options
  before, let's try that", really liking how much easier it made
  adjusting columns for Master lists, then noticing that it applied
  *globally* and so nuked my carefully adjusted columns on the Mods
  tab. Instead, each setting now only applies to the tab/list you
  enable it on, allowing you to use it for just the lists where it
  helps you.
- d1290a5, which was already
  mentioned in "wx (#190)". ListBoxes was just no good for usability.
  They didn't remember sizes, always started out being sized wrong and
  don't even wrap text correctly when you do resize them. Replacing
  them with custom classes allowed us to massively improve the
  usability of all kinds of popups and dialogs throughout WB. The
  second part of this refactoring arrived later, in
  15444ca.

-----------------------------------------------------------------------

### Image handling (#366, #557)

As an offshoot of #190, we have the venerable #366. Image handling is
still very much a work in progress, but
f7dd4dc brings us a lot closer.
Fleshing out the image API and making it ready for SVGs, it also
replaces many of our somewhat crusty images with SVGs that can scale
to any size we need. It also further decouples us from wx (see the
second entry in the "wx (#190)" section up above).

-----------------------------------------------------------------------

### File operations (#241)

In b5bb441, @lojack5 changed our
file operations backend on Windows to use the newer IFileOperation API
instead of the old SHFileOperation API. This was no easy task, as
pywin32's support for IFileOperation is broken for some reason and so
@lojack5 had to write a wrapper from scratch.

-----------------------------------------------------------------------

### Update checking (#663)

Come 312, we want to replace our nine(!) Nexus page with a single one
in the Modding Tools section. The LOOT team recently took the same
step. The main reason is simply because updating nine pages for every
release *sucks*. Even moreso if the release gets detected as a virus.

However, the problem with moving to a single page is discoverability.
The Nexus team have indicated that they're interested in adding the
ability for pages in the Modding Tools section to indicate that they
support certain games, so that they'll show up in the search results
for searches on those games' pages, but that's not implemented yet.

To that end, we implemented an update check. Once 312 is released on
the new Nexus page, we can stop updating the other pages and direct
users to the new one via the update popup. Of course, the update check
can be disabled in the settings and a manual version of the check is
also accessible from there. You can also adjust how frequently the
update check happens (the default is once every hour).

-----------------------------------------------------------------------

### Linux (#243)

Near the end of 311's development, I bought an NVME SSD and took the
opportunity to redo my dual boot environment. After backing up and
restoring the Windows part of my dual boot, Windows promptly decided
to ruin my day by first breaking Firefox and Thunderbird, then
breaking the entire Start menu. Since I can't really get work done
when I have to use stupid workarounds like "Windows+R > explorer.exe
or wt.exe > launch the app I actually want to launch", I said "screw
it" and moved entirely to Linux.

Born out of that is the last part of 311:
- 1d6db12 fixed a smorgasbord of
  random problems when using WB on Linux.
- 1fe6d2d made BAIN wizard and
  FOMOD images work on Linux.
- 1581953 fixed the GTK webview
  refusing to load when we have a file with '&' in its filename.
- 1d07fc3 implemented sending files
  to the recycle bin on Linux.

Most of these apply to our (even more WIP) macOS support as well.

-----------------------------------------------------------------------

There were many, many, *many* other changes - again, 500 commits.
One person who hasn't been mentioned so far is @sibir-ine, who
contributed lots of minor improvements to WB's out-of-the-box
usability (e.g. default BAIN directories) and tirelessly helped with
monitoring the Discord server and recording the reported bugs on our
project board.

Massive thanks to everyone who contributed to this release, including:

@Infernio, @Utumno, @sibir-ine, @lojack5, @BeermotorWB and many more
that GitHub's contribution tracker doesn't list.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-gui Area: GUI (The wx wrapper classes in the gui package) A-usability Area: Usability (UX improvements that benefit everyone) C-enhancement Category: Enhancement, a request to add or enhance a feature M-relnotes Misc: Issue should be listed in the version history for its milestone
Projects
None yet
Development

No branches or pull requests

1 participant