Page MenuHomeWildfire Games

Chat notification filter
Needs ReviewPublic

Authored by elexis on Aug 6 2018, 11:50 AM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

Sometimes one wants to only wants to read who connected/disconnected/started-rejoin/finished-rejoin/got-kicked/got-banned/got-attacked/was-defeated/has-won.

Test Plan

Should the network-connection status messages have a filter separate to the ingame notifications?

Diff Detail

Repository
rP 0 A.D. Public Repository
Branch
/ps/trunk
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 6327
Build 10498: Vulcan BuildJenkins
Build 10497: arc lint + arc unit

Event Timeline

elexis created this revision.Aug 6 2018, 11:50 AM
Vulcan added a subscriber: Vulcan.Aug 6 2018, 12:50 PM

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Default...
Executing section Source...
Executing section JS...
|    | [NORMAL] ESLintBear (space-before-function-paren):
|    | Unexpected space before function parentheses.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/messages.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/messages.js
| 475| 475| 		g_Selection.reset();
| 476| 476| 		g_Selection.addList(selection, false, cmd.type == "gather");
| 477| 477| 	},
| 478|    |-	"play-tracks": function (notification, player)
|    | 478|+	"play-tracks": function(notification, player)
| 479| 479| 	{
| 480| 480| 		if (notification.lock)
| 481| 481| 		{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/messages.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/messages.js
| 582| 582| 	let notificationText =
| 583| 583| 		notification.instructions.reduce((instructions, item) =>
| 584| 584| 			instructions + (typeof item == "string" ? translate(item) : colorizeHotkey(translate(item.text), item.hotkey)),
| 585|    |-			"");
|    | 585|+		"");
| 586| 586| 
| 587| 587| 	Engine.GetGUIObjectByName("tutorialText").caption = g_TutorialMessages.concat(setStringTags(notificationText, g_TutorialNewMessageTags)).join("\n");
| 588| 588| 	g_TutorialMessages.push(notificationText);
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/messages.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/messages.js
|1090|1090| 
|1091|1091| 	let message = "";
|1092|1092| 	if (notifyPhase == "all")
|1093|    |-	{
|    |1093|+	
|1094|1094| 		if (msg.phaseState == "started")
|1095|1095| 			message = translate("%(player)s is advancing to the %(phaseName)s.");
|1096|1096| 		else if (msg.phaseState == "aborted")
|1097|1097| 			message = translate("The %(phaseName)s of %(player)s has been aborted.");
|1098|    |-	}
|    |1098|+	
|1099|1099| 	if (msg.phaseState == "completed")
|1100|1100| 		message = translate("%(player)s has reached the %(phaseName)s.");
|1101|1101| 

binaries/data/mods/public/gui/session/messages.js
| 641| »   while·(true)
|    | [NORMAL] ESLintBear (no-constant-condition):
|    | Unexpected constant condition.

Link to build: https://jenkins.wildfiregames.com/job/differential/713/display/redirect