Skip to content

fix: remove unused navigation menus from multiple files - #241

Merged
EnzoBagnis merged 1 commit into
devfrom
Merge-IA-sur-graphes
Mar 11, 2026
Merged

fix: remove unused navigation menus from multiple files#241
EnzoBagnis merged 1 commit into
devfrom
Merge-IA-sur-graphes

Conversation

@EnzoBagnis

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings March 11, 2026 20:49
@EnzoBagnis
EnzoBagnis merged commit f7b7b5e into dev Mar 11, 2026
8 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR removes the legacy <nav class="nav-menu"> blocks from multiple PHP view templates to simplify headers and rely on the remaining header/burger UI.

Changes:

  • Removed .nav-menu markup across user, resources, exercises, and admin views.
  • Eliminated desktop navigation links previously rendered inside .nav-menu in several pages.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
App/View/user/resources_list.php Removes an unused/empty .nav-menu element from the header.
App/View/user/resource_details.php Removes an unused/empty .nav-menu element from the header.
App/View/user/mentions-legales.php Removes an unused/empty .nav-menu element from the header.
App/View/user/ia.php Removes .nav-menu links from the header.
App/View/user/dashboard.php Removes .nav-menu links from the header.
App/View/resources/list.php Removes .nav-menu link(s) from the header.
App/View/resources/details.php Removes .nav-menu links from the header.
App/View/resources/create.php Removes .nav-menu link(s) from the header.
App/View/exercises/show.php Removes .nav-menu links from the header.
App/View/exercises/list.php Removes .nav-menu links from the header.
App/View/admin/admin-dashboard.php Removes .nav-menu link(s) from the header.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread App/View/user/ia.php
@@ -165,10 +165,6 @@
<button class="burger-menu" id="burgerBtn" onclick="toggleBurgerMenu()" aria-label="Menu">

Copilot AI Mar 11, 2026

Copy link

Choose a reason for hiding this comment

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

Le bouton burger appelle toggleBurgerMenu() via onclick, mais ce fichier ne charge aucun script qui définit cette fonction (pas de dashboard-main.js) et ne contient pas non plus de <nav id="burgerNav">. Résultat : clic = ReferenceError et aucune navigation mobile après la suppression du .nav-menu. Ajouter l’implémentation du menu burger (markup #burgerNav + JS commun) ou supprimer le bouton/onclick si ce menu n’est pas utilisé ici.

Suggested change
<button class="burger-menu" id="burgerBtn" onclick="toggleBurgerMenu()" aria-label="Menu">
<button class="burger-menu" id="burgerBtn" aria-label="Menu">

Copilot uses AI. Check for mistakes.
Comment on lines 108 to 114
<header class="top-menu">
<div class="logo"><h1>StudTraj</h1></div>
<button class="burger-menu" id="burgerBtn" onclick="toggleBurgerMenu()" aria-label="Menu">
<span></span><span></span><span></span>
</button>
<nav class="nav-menu">
<a href="<?= BASE_URL ?>/resources" class="active">Ressources</a>
</nav>
<div class="header-right">
<div class="user-profile">

Copilot AI Mar 11, 2026

Copy link

Choose a reason for hiding this comment

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

Le bouton burger appelle toggleBurgerMenu() mais cette page ne charge aucun JS qui définit cette fonction et ne rend pas de <nav id="burgerNav"> (contrairement aux autres pages). Sur mobile, le clic sur le burger déclenchera une erreur JS et le menu ne pourra pas s’ouvrir. Soit intégrer le menu burger standard (markup #burgerNav + script commun), soit retirer le bouton/onclick sur cette page.

Copilot uses AI. Check for mistakes.
Comment on lines 146 to 150
<button class="burger-menu" id="burgerBtn" onclick="toggleBurgerMenu()" aria-label="Menu">
<span></span><span></span><span></span>
</button>
<nav class="nav-menu">
<a href="<?= BASE_URL ?>/resources" class="active">Ressources</a>
<a href="<?= BASE_URL ?>/exercises">Exercices</a>
<a href="<?= BASE_URL ?>/ia">IA</a>
</nav>
<div class="header-right">
<button onclick="openImportModal(<?= (int)$resource->getResourceId() ?>)" class="btn-import-trigger">

Copilot AI Mar 11, 2026

Copy link

Choose a reason for hiding this comment

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

Le bouton burger (onclick="toggleBurgerMenu()") est présent, mais ce template ne charge pas le script commun qui définit toggleBurgerMenu (pas de dashboard-main.js) et ne fournit pas non plus une implémentation inline. Un clic déclenchera donc une ReferenceError et empêchera l’ouverture/fermeture du menu (surtout après la suppression du .nav-menu). Charger le JS commun du burger, ou définir une fonction toggleBurgerMenu locale, ou retirer l’onclick si le menu burger n’est pas supporté ici.

Copilot uses AI. Check for mistakes.
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