Skip to content

Conversation

@TheMadSword
Copy link
Contributor

@TheMadSword TheMadSword commented Jul 18, 2023

What it looks like :

image image

I'm using a simple html tooltip ("title").

I did as I said in my edit @ issue; I'm not saving anything, but just calculating percent for highest/lowest ratings.

@TheMadSword TheMadSword changed the title ~Show highest/lowest rating percent equivalence - Closes 12631 ~Show highest/lowest rating percent equivalence - Closes #12631 Jul 18, 2023
@TheMadSword TheMadSword force-pushed the rating_percent_highlow branch from 4e44eb5 to c39607d Compare July 18, 2023 06:06
glicko(user, perfType, user.perfs(perfType), percentile),
counter(stat.count),
highlow(stat),
highlow(stat, percentile_low, percentile_high),
Copy link
Collaborator

Choose a reason for hiding this comment

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

scala never uses underscore, please look at the code around

<string name="yourPerfTypeRatingIsRating">Your %1$s rating is %2$s.</string>
<string name="youAreBetterThanPercentOfPerfTypePlayers">You are better than %1$s of %2$s players.</string>
<string name="userIsBetterThanPercentOfPerfTypePlayers">%1$s is better than %2$s of %3$s players.</string>
<string name="currentlyRepresentingBeingBetterThanPercentPlayers">Currently representing being better than %1$s of %2$s players</string>
Copy link
Collaborator

Choose a reason for hiding this comment

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

unnecessarily verbose.

<string name="betterThanPercentPlayers">Better than %1$s of %2$s players</string>

}

private def calc_percentile(wrd: Option[List[Int]], intRating: IntRating): Option[Double] = {
return (wrd.map: distrib =>
Copy link
Collaborator

Choose a reason for hiding this comment

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

we never use the word return

@TheMadSword
Copy link
Contributor Author

Thanks for the feedbacks :) ! Will fix probably Soon™ .

@TheMadSword
Copy link
Contributor Author

Hi ! The changes were made following your feedback !

Also to show the updated first-post image :

image

Thank you !

* master: (21 commits)
  index dox notes
  unignore streamer application on unmute
  ABR - Always Be Resolving
  Update reload.ts
  remove old mobile UA test
  upgrade scalachess
  parse lichess-bot UA
  remove old mobile UA regex
  New Crowdin updates (lichess-org#13207)
  fix submitMove pref - closes lichess-org#13237
  Update lettuce-core to 6.2.5.RELEASE
  Update sbt-bloop to 1.5.9
  fix gone notifications - closes lichess-org#13233
  scalachess 15.5.0
  better integrate lichess mobile user agent
  integrate mobile app connections into security/modding
  remove yarn refs
  gitignore pnpm-store dir
  mobile oauth security entries WIP
  fix lint
  ...
@ornicar
Copy link
Collaborator

ornicar commented Jul 20, 2023

please format your code before committing:

sbt scalafmtAll

Most editors can do it automatically.

yield PerfStatData(u, perfStat, rankingsOf(u.id), percentile, percentileLow, percentileHigh)
}

private def calc_percentile(wrd: Option[List[Int]], intRating: IntRating): Option[Double] =
Copy link
Collaborator

Choose a reason for hiding this comment

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

underscore

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry for that miss :x

@TheMadSword
Copy link
Contributor Author

TheMadSword commented Jul 20, 2023

please format your code before committing:

sbt scalafmtAll

Most editors can do it automatically.

I'm confused; I guess I learned that "sbt scalafmtAll" (gives error, as seen below) doesn't do the same as "yarn run format" (no changes).

sbt scalafmtAll end of output (error on files I didn't change Env.scala @ scala3; it still formated a few of my files files that I'll push) :

[error] org.scalafmt.sbt.ScalafmtSbtReporter$ScalafmtSbtError: scalafmt: /Users/redmba/dev/myLichess/lila/modules/tournament/src/main/Env.scala:74: error: [dialect scala3] ; expected but , found [error] else if Revolution is tour then scheduler.scheduleOnce(10 seconds) { revolutionApi.clear() }, [error] ^ [/Users/redmba/dev/myLichess/lila/modules/tournament/src/main/Env.scala] [error] (tournament / Compile / scalafmt) org.scalafmt.sbt.ScalafmtSbtReporter$ScalafmtSbtError: scalafmt: /Users/redmba/dev/myLichess/lila/modules/tournament/src/main/Env.scala:74: error: [dialect scala3] ; expected but , found [error] else if Revolution is tour then scheduler.scheduleOnce(10 seconds) { revolutionApi.clear() }, [error] ^ [/Users/redmba/dev/myLichess/lila/modules/tournament/src/main/Env.scala]

@TheMadSword TheMadSword force-pushed the rating_percent_highlow branch from 59d367f to 14a389b Compare July 20, 2023 07:01
@TheMadSword
Copy link
Contributor Author

Thanks again :x ; done !

ornicar added 4 commits July 20, 2023 09:24
…rd/lila into rating_percent_highlow

* 'rating_percent_highlow' of https://github.com/TheMadSword/lila:
  ~Modifs for PR (1st & 2nd review) ~scalafmtAll
* master:
  work around scalafmt bug
  support mobile UAs without a build number
  tweak eval cache
  Use webkitAudioContext as a fallback for iOS Safari < 14.5
@ornicar
Copy link
Collaborator

ornicar commented Jul 20, 2023

please stop force-pushing, it makes collaboration on the PR very hard. We're both committing and our trees become incompatible with each force push.

@ornicar ornicar merged commit a1185ee into lichess-org:master Jul 20, 2023
@TheMadSword
Copy link
Contributor Author

please stop force-pushing, it makes collaboration on the PR very hard. We're both committing and our trees become incompatible with each force push.

My apologies; it is noted; I didn't think you'd commit; I'll try to stop force-pushing once a non-draft PR is published

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