-
Notifications
You must be signed in to change notification settings - Fork 7
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
[Carte] Normalise la position des menus #3131
Conversation
a7574b3
to
3e30ef4
Compare
|
||
import { mainWindowActions } from '../slice' | ||
|
||
export function LeftMenu() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export function LeftMenu() { | |
export function LeftMapMenu() { |
?
const missionButtonRef = useRef<HTMLDivElement | null>(null) | ||
|
||
const dispatch = useMainAppDispatch() | ||
const { favorites } = useMainAppSelector(state => state.favoriteVessel) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const { favorites } = useMainAppSelector(state => state.favoriteVessel) | |
const favorites = useMainAppSelector(state => state.favoriteVessel.favorites) |
?
)} | ||
|
||
{import.meta.env.FRONTEND_PRIOR_NOTIFICATION_LIST_ENABLED === 'true' && ( | ||
<IconButton Icon={Icon.Fishery} size={Size.LARGE} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Il manque d'ailleurs ce bouton dans le slice displayedComponent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bien vu !
left: 112px; | ||
top: 12px; | ||
|
||
* { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Il faudra qu'on arrive à enlever ce style car on est obligé de l'injecter dans beaucoup de composants enfants :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alors l'idée c'est de finir par le mettre en global plutôt comme c'est le standard pour grandement facilement les calculs de tailles en séparant l'espace intérieur de l'espace extérieur.
- Tout est construit sur cette base sur monitor-ui,
- rapport-nav l'a en global : https://github.com/MTES-MCT/rapportnav2/blob/main/frontend/src/assets/css/index.css,
- et Rsuite d'ailleurs aussi : https://github.com/rsuite/rsuite/blob/main/src/styles/normalize.less
Du coup je suis d'accord mais dans le sens où une fois tout migré, on l'aura en global via rsuite et on pourra le retirer partout ailleurs.
Au passage cette PR fixe pas mal de soucis visuels en prod, sur les dialogs/overlays des contacts par exemple.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oui c'est ce que je voulais dire pour le passage en global et le fait de l'enlever dans les composants enfants
{isFavoriteVesselsMapButtonDisplayed && ( | ||
<Block> | ||
<IconButtonWrapper> | ||
<IconButtonBadge $isActive={leftDialog?.key === 'FAVORITE_VESSELS'}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
il manque un onClick
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In progress, mais oui en effet.
} | ||
|
||
return ( | ||
<Wrapper data-cy="missions-menu-box" style={{ top: leftDialog?.topPosition }}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je ne vois pas où est l'animation sur l'ouverture ?
import { sideWindowActions } from '../../../domain/shared_slices/SideWindow' | ||
import { mainWindowActions } from '../../MainWindow/slice' | ||
|
||
export function MissionMenuDialog() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ça me va d'utiliser Dialog
@@ -11,6 +13,15 @@ export const addReporting = | |||
(newReporting: ReportingCreation): MainAppThunk<Promise<void>> => | |||
(dispatch, getState) => { | |||
const { selectedVesselIdentity } = getState().vessel | |||
// TODO Can this case happen? Is it the right way to handle it? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je ne vois pas comment, car un signalement s'ajoute quand la fiche navire est ouverte (on a donc un selectedVesselIdentity
).
Autant mettre un assert
je pense
(dispatch, getState) => { | ||
const { selectedVesselIdentity } = getState().vessel | ||
// TODO Can this case happen? Is it the right way to handle it? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
@@ -29,6 +30,15 @@ export function VesselName({ focusOnVesselSearchInput }) { | |||
const addOrRemoveToFavorites = useCallback( | |||
e => { | |||
e.stopPropagation() | |||
// TODO Can this case happen? Is it the right way to handle it? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same, n'est possible que dans la fiche navire est ouverte
…te vessel callback
3e30ef4
to
eb25491
Compare
Quality Gate passedIssues Measures |
Repris ici : #3634 |
Linked issues