#668-Add-preview-header #696

Merged
a22erigr merged 8 commits from #668-Add-preview-header into team_2_week_4 2026-05-06 06:34:31 +00:00
Collaborator

Adds "Preview" over the selected view.

Adds "Preview" over the selected view.
Collaborator

Review on #668

Whats done

Tested on Windos using Chrome

  • Verified that "Preview" is displayed above selected view
  • Tested selecting different views and confirmed preview updates correctly.
  • App starts
    +No crashes when opening Add Card modal
    • Tested multiple views and preview randering
  • Layout appears centered and spaced

Inspected following files

  • frontend/src/features/addCardModal/AddCardModal.js
    • indentation is ok

    • Naming convention

      • Follows React and camelCase conventions
      • Comment
        +Acceptable level of comments
      • General code quality
        +Code is readable and structured clearly
      • frontend/src/features/addCardModal/AddCardModal.module.css
      • Indentation/code styling
      • Follows CSS formatting standard
        +Naming convention
        • Does not follow convention
        • Uses .preview-header instead of matching JSX usage
      • Comments
        +Missing comment for new rule set
      • General code quality
        +Styling is simple and understandable
    • [What needs to be done

      • AddCardModal.module.css + AddCardModal.js
        • Fix mismatch between CSS module class and JSX usage
        • JSX uses:
          +styles.previewHeader
          +CSS defines:
          • .preview-header
            +These must match for CSS modules to apply styling correctly
            +Rename CSS class to .previewHeader or update JSX to styles[preview-header]
            +AddCardModal.module.css
            +Add descriptive comment above the preview header rule set

Conclusion

+Feature works as intended in the UI
+However, styling works due to existing layout, not the new CSS class

  • Not ready for merge until naming issue is fixed
# Review on #668 ## Whats done ### Tested on Windos using Chrome + Verified that "Preview" is displayed above selected view + Tested selecting different views and confirmed preview updates correctly. + App starts +No crashes when opening Add Card modal + Tested multiple views and preview randering + Layout appears centered and spaced ### Inspected following files + frontend/src/features/addCardModal/AddCardModal.js + indentation is ok + Naming convention + Follows React and camelCase conventions + Comment +Acceptable level of comments + General code quality +Code is readable and structured clearly + frontend/src/features/addCardModal/AddCardModal.module.css + Indentation/code styling + Follows CSS formatting standard +Naming convention + Does not follow convention + Uses .preview-header instead of matching JSX usage + Comments +Missing comment for new rule set + General code quality +Styling is simple and understandable + [What needs to be done + AddCardModal.module.css + AddCardModal.js + Fix mismatch between CSS module class and JSX usage + JSX uses: +styles.previewHeader +CSS defines: + .preview-header +These must match for CSS modules to apply styling correctly +Rename CSS class to .previewHeader or update JSX to styles[preview-header] +AddCardModal.module.css +Add descriptive comment above the preview header rule set ## Conclusion +Feature works as intended in the UI +However, styling works due to existing layout, not the new CSS class + Not ready for merge until naming issue is fixed
Collaborator

image

![image](/attachments/3be36e8f-7fee-4e80-a32a-aa4a6d7368dc)
Author
Collaborator

Thank you for the review!

I have updated AddCardModal.js to match the naming convention and I have also added comments to AddCardModal.module.css.

Thank you for the review! I have updated AddCardModal.js to match the naming convention and I have also added comments to AddCardModal.module.css.
c24elipe left a comment
Collaborator

On a quick overview, the code looks good.
Will now look over it properly in the editor.

On a quick overview, the code looks good. Will now look over it properly in the editor.
1. Fixed a spelling mistake  categoires -> categories
2. Removed a none existent style class.
3. Removed unnecessary variable
4. Ran prettier to double check
Collaborator

Re-Review on #668

Whats done

Tested on cachyOs (Arch Linux) and Brave browser.

  • The first steps where similar to what was done in the first review. Mainly compiling and opening the add card menu to seeing that the text shows up. It did.

image

Inspected the following files

  • frontend/src/features/addCardModal/AddCardModal.js:

    • Indentation:
      • The prettier config is used and therefore good.
    • Comment:
      • As someone with lacking react-knowledge, I would say it is a suitable amount of comments.
    • Naming convention:
      • The convention, as far as I can tell, is being followed well.
    • General code quality:
      • Some code problems were found. However, those where outside the scope of this PR and unrelated to the code created. Therefore, I saw it fit to just fix the 3 minor code problems found. The results of which can be seen in the commit above. No problem with the code otherwise.
  • frontend/src/features/addCardModal/AddCardModal.module.css:

    • Indentation:
      • Again, the prettier config is used and therefore good.
    • Comment:
      • The file overall goes against the Coding Conventions for CSS. Specifically the rule
        "Have descriptive comments for every rule set". But the problem with that statement is that the parts that go against the conventions aren't added in this PR and already exist. So, it is a question if that is something to fix in this PR or later?.
    • Naming convention:
      • Like before, the code that was added in this PR follows the naming standard. But the older code doesn't. Specifically, the rules that all names should be lower case and use a hyphen between words.
    • General code quality:
      • Just because I love repeating myself. The code that was added in this PR is correctly placed and holds the standard for the code we aim to keep. But again, the older code is placed in a non-alphabetical order, lacks comments, and doesn't follow the naming standard.

What needs to be done

Nothing need to be done with the code created for this Issue and PR.
But since there are several issues with, let's be honest, most code conventions in the overall "AddCardModal.module.css" file, it is worth contemplating if it should be fixed before merging.

Conclusion

The code can be merged if the issues in "AddCardModal.module.css" can be ignored .

# Re-Review on #668 ## Whats done ### Tested on cachyOs (Arch Linux) and Brave browser. * The first steps where similar to what was done in [the first review](https://git.webug.se/Andras/BoundlessFlowCampus2K/pulls/696#issuecomment-7469). Mainly compiling and opening the add card menu to seeing that the text shows up. It did. ![image](/attachments/aa72dcf6-8caa-4947-9bde-cfd2d61d2fd7) ### Inspected the following files * **frontend/src/features/addCardModal/AddCardModal.js**: * **Indentation**: * The prettier config is used and therefore good. * **Comment**: * As someone with lacking react-knowledge, I would say it is a suitable amount of comments. * **Naming convention**: * The convention, as far as I can tell, is being followed well. * **General code quality**: * Some code problems were found. However, those where outside the scope of this PR and unrelated to the code created. Therefore, I saw it fit to just fix the 3 minor code problems found. The results of which can be seen in the commit above. No problem with the code otherwise. * **frontend/src/features/addCardModal/AddCardModal.module.css**: * **Indentation**: * Again, the prettier config is used and therefore good. * **Comment**: * The file overall goes against the Coding Conventions for CSS. Specifically the rule "Have descriptive comments for every rule set". But the problem with that statement is that the parts that go against the conventions aren't added in this PR and already exist. So, it is a question if that is something to fix in this PR or later?. * **Naming convention**: * Like before, the code that was added in this PR follows the naming standard. But the older code doesn't. Specifically, the rules that all names should be lower case and use a hyphen between words. * **General code quality**: * Just because I love repeating myself. The code that was added in this PR is correctly placed and holds the standard for the code we aim to keep. But again, the older code is placed in a non-alphabetical order, lacks comments, and doesn't follow the naming standard. ### What needs to be done Nothing need to be done with the code created for this Issue and PR. But since there are several issues with, let's be honest, most code conventions in the overall "_AddCardModal.module.css_" file, it is worth contemplating if it should be fixed before merging. ## Conclusion The code can be merged if the issues in "_AddCardModal.module.css_" can be ignored .
172 KiB
c24elipe approved these changes 2026-05-05 22:07:34 +00:00
Collaborator

Nothing need to be done with the code created for this Issue and PR.
But since there are several issues with, let's be honest, most code conventions in the overall "AddCardModal.module.css" file, it is worth contemplating if it should be fixed before merging.

Unfortunately we don't have time to fix the overall code convention in AddCardModal.module.css before weekly merge. I will create a issue on this.

_Nothing need to be done with the code created for this Issue and PR. But since there are several issues with, let's be honest, most code conventions in the overall "AddCardModal.module.css" file, it is worth contemplating if it should be fixed before merging._ Unfortunately we don't have time to fix the overall code convention in AddCardModal.module.css before weekly merge. I will create a issue on this.
a22erigr merged commit 33150792a8 into team_2_week_4 2026-05-06 06:34:31 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Andras/BoundlessFlowCampus2K!696
No description provided.