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

CMM #461

Draft
wants to merge 19 commits into
base: main
Choose a base branch
from
Draft

CMM #461

wants to merge 19 commits into from

Conversation

foucblg
Copy link
Contributor

@foucblg foucblg commented Dec 22, 2024

No description provided.

@codecov-commenter
Copy link

codecov-commenter commented Dec 22, 2024

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Project coverage is 54.09%. Comparing base (315d1f9) to head (ec54092).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
lib/tools/cache/cache_manager.dart 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #461      +/-   ##
==========================================
- Coverage   54.18%   54.09%   -0.09%     
==========================================
  Files         169      169              
  Lines        3739     3745       +6     
==========================================
  Hits         2026     2026              
- Misses       1713     1719       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Marc-Andrieu Marc-Andrieu mentioned this pull request Dec 25, 2024
5 tasks
@armanddidierjean armanddidierjean marked this pull request as draft January 2, 2025 19:10
foucblg pushed a commit that referenced this pull request Jan 6, 2025
> [!IMPORTANT]
> We really need to release new versions **soon**, as we have not for
several months and there's some time needed to test in alpha before
prod.

This goes hand in hand with the **major version bump** [for
Hyperion](../../Hyperion/pull/642).

Both PRs are ready, and _seemingly_ waiting for some more **breaking
changes** to be merged, including (by likelihood):

- [x] Support Flutter 3.27: #464
- [ ] Allow students from other Schools to have a MyECL account: #447 
- [ ] MyECLPay: #72 (old PR but recent branch)
- [ ] "_Centrale Mega Meme_" Meme module: #461 
- [x] External Notifications: #448
final isCMMAdminProvider = StateProvider<bool>((ref) {
final me = ref.watch(userProvider);
for (final group in me.groups) {
if (group.name == "CMM") {
Copy link
Member

Choose a reason for hiding this comment

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

You better have to check with the group.id instead of the name, because nothing is preventing another group to be named CMM, thus giving its members the visual of the admin panel, even if Hyperion will block their requests

Future<List<CMM>> getCMM() async {
//return (await getList(suffix: '')).map((e) => CMM.fromJson(e)).toList();
return [
CMM(
Copy link
Member

Choose a reason for hiding this comment

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

Consider unmocking when going from Draft to PR and to test with the backend

CMMScore(value: 1, user: user, position: 3),
];
// return List<CMMScore>.from(
// (await getList(suffix: "CMMScores"))
Copy link
Member

Choose a reason for hiding this comment

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

Same goes here

Future<List<CMM>> getMyCMM() async {
//return (await getList(suffix: '')).map((e) => CMM.fromJson(e)).toList();
return [
CMM(
Copy link
Member

Choose a reason for hiding this comment

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

Just to avoid missing one in the process

path: add,
builder: () => const AddCMMPage(),
),
],
Copy link
Member

Choose a reason for hiding this comment

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

You should also use the DeferredLoadingMiddleware here, to further improve loading time

Copy link
Member

Choose a reason for hiding this comment

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

Not sure about the relevance of the comments in this file

decoration: BoxDecoration(
border: Border.all(color: Colors.black, width: 2),
borderRadius: const BorderRadius.only(
topLeft: Radius.circular(20), // Rounded top-left corner
Copy link
Member

Choose a reason for hiding this comment

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

I don't clearly see the purpose of the comment here, the code speaks for itself i my opinion

style: (score.position == 1 ||
score.position == 2 ||
score.position == 3)
? const TextStyle(
Copy link
Member

Choose a reason for hiding this comment

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

Can't score.position <= 3 can just sum all of this up ?

FormField<File>(
validator: (e) {
if (poster.value == null) {
return "Choix poster";
Copy link
Member

Choose a reason for hiding this comment

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

Maybe go for a more explicit message : "Aucun fichier choisis"

child: posterFile.value != null
?
// ? Container(
// decoration: BoxDecoration(
Copy link
Member

Choose a reason for hiding this comment

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

Just don't forget to delete it if you are certain not to use it anymore, it should not stay in the PR in the end

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.

3 participants