Add mapfix history on maps page #294

Merged
itzaname merged 2 commits from feature/mapfix-list into staging 2025-12-27 04:51:04 +00:00
Owner

If map fixes exist for a map they will be displayed under the map image. Active map fixes were moved to be in this new element as well.

image.png
image.png
image.png

If map fixes exist for a map they will be displayed under the map image. Active map fixes were moved to be in this new element as well. ![image.png](/attachments/012e1055-3aba-40a4-97fe-e59d2ff9fb51) ![image.png](/attachments/d6c0e3b9-2578-4cd5-b15e-e2861c73819e) ![image.png](/attachments/cbec73a6-3f3d-48b6-bc14-18659b6aa94f)
506 KiB
469 KiB
491 KiB
itzaname added the frontend label 2025-12-27 01:41:35 +00:00
itzaname added 2 commits 2025-12-27 01:41:35 +00:00
Add mapfix history on maps page
All checks were successful
continuous-integration/drone/push Build is passing
a19bc4d380
Just exclude rejected and released for active list
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
01cfe67848
itzaname requested review from Quaternions 2025-12-27 01:41:35 +00:00
Author
Owner

Closes !235

Closes !235
Quaternions requested changes 2025-12-27 02:00:09 +00:00
Dismissed
@@ -358,0 +378,4 @@
{/* Mapfix Section - Active + History */}
{mapfixes.length > 0 && (() => {
const activeFix = mapfixes.find(fix => fix.StatusID !== MapfixStatus.Rejected && fix.StatusID !== MapfixStatus.Released);
Owner

Mapfixes UnderConstruction should not be considered active. ChangesRequested is debatable, but I would consider "active" to mean "requires staff attention", i.e. attention from someone who is not the map fixer.

const activeFix = mapfixes.find(fix => fix.StatusID !== MapfixStatus.Rejected && fix.StatusID !== MapfixStatus.Released && fix.StatusID !== MapfixStatus.UnderConstruction && fix.StatusID !== MapfixStatus.ChangesRequested);
Mapfixes UnderConstruction should not be considered active. ChangesRequested is debatable, but I would consider "active" to mean "requires staff attention", i.e. attention from someone who is not the map fixer. ```js const activeFix = mapfixes.find(fix => fix.StatusID !== MapfixStatus.Rejected && fix.StatusID !== MapfixStatus.Released && fix.StatusID !== MapfixStatus.UnderConstruction && fix.StatusID !== MapfixStatus.ChangesRequested); ```
Author
Owner

So the existing implementation was incorrect?

So the existing implementation was incorrect?
Owner

Yes, it was incorrect. Submitting another mapfix is blocked if there is an active mapfix. This is the list of statuses which are considered "active":

// limit mapfixes in the pipeline to one per target map
ActiveAcceptedMapfixStatuses = []model.MapfixStatus{
model.MapfixStatusReleasing,
model.MapfixStatusUploaded,
model.MapfixStatusUploading,
model.MapfixStatusValidated,
model.MapfixStatusValidating,
model.MapfixStatusAcceptedUnvalidated,
}

Note that this list does not include fixes that are Under Review (MapfixStatus.Submitted), so multiple mapfixes for the same map may be submitted at the same time, but not accepted at the same time.

I think it would be useful to include submitted mapfixes (MapfixStatus.Submitted) in this list in case the submitter is about to duplicate an effort that is already submitted.

Yes, it was incorrect. Submitting another mapfix is blocked if there is an active mapfix. This is the list of statuses which are considered "active": https://git.itzana.me/StrafesNET/maps-service/src/commit/ae006565d689a4829cde53a274869caf54e34323/pkg/web_api/mapfixes.go#L23-L31 Note that this list does not include fixes that are Under Review (MapfixStatus.Submitted), so multiple mapfixes for the same map may be submitted at the same time, but not accepted at the same time. I think it would be useful to include submitted mapfixes (MapfixStatus.Submitted) in this list in case the submitter is about to duplicate an effort that is already submitted.
Owner

I can fix it later since it was already like that.

I can fix it later since it was already like that.
Quaternions marked this conversation as resolved
@@ -69,0 +72,4 @@
iconName: string;
}
function getMapfixStatusInfo(statusId: MapfixStatus): MapfixStatusInfo {
Owner

Isn't this info duplicated for the status icon on the mapfix page?

Isn't this info duplicated for the status icon on the mapfix page?
Author
Owner

That's why it's in a central importable lib instead of embedded into the page. Hunting down all duplication of this is not in scope for the feature. In the future this can be used instead.

That's why it's in a central importable lib instead of embedded into the page. Hunting down all duplication of this is not in scope for the feature. In the future this can be used instead.
Quaternions marked this conversation as resolved
Quaternions approved these changes 2025-12-27 04:17:33 +00:00
itzaname merged commit efeb525e19 into staging 2025-12-27 04:51:04 +00:00
itzaname deleted branch feature/mapfix-list 2025-12-27 04:51:04 +00:00
Sign in to join this conversation.