Skip to content

Commit

Permalink
revert: revert parts of lint PR and fix broken EFB (flybywiresim#9050)
Browse files Browse the repository at this point in the history
* revert: EFB related changes

* fix: don't enforce short-hand, re-run lint
  • Loading branch information
2hwk authored Oct 9, 2024
1 parent 5cd1870 commit f70f617
Show file tree
Hide file tree
Showing 18 changed files with 21 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ module.exports = {

'tailwindcss/classnames-order': 'error',
'tailwindcss/enforces-negative-arbitrary-values': 'error',
'tailwindcss/enforces-shorthand': 'error',
'tailwindcss/enforces-shorthand': 'off',
'tailwindcss/migration-from-tailwind-2': 'error',
'tailwindcss/no-contradicting-classname': 'error',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export const NavigraphAuthUI = () => {
const hasQr = !!params?.verification_uri_complete;

return (
<div className="size-full flex items-center justify-center overflow-x-hidden rounded-lg bg-theme-accent p-6">
<div className="flex h-full w-full items-center justify-center overflow-x-hidden rounded-lg bg-theme-accent p-6">
<div className="flex flex-col items-center justify-center">
<ShieldLock className="mr-2" size={40} />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export const ChecklistItemComponent = ({ item, index }: ChecklistItemComponentPr
onClick={handleChecklistItemClick}
>
{item.item && isAnyItemType && (
<div className="size-8 flex shrink-0 items-center justify-center border-4 border-current text-current">
<div className="flex h-8 w-8 shrink-0 items-center justify-center border-4 border-current text-current">
{!!autoFillChecklists && item.condition && (
<Link45deg
size={40}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,9 @@ export const FlightWidget = () => {
</div>
</div>
)}
<div className={simbriefDataLoaded ? '' : 'size-full flex flex-col items-center justify-center space-y-4'}>
<div
className={simbriefDataLoaded ? '' : 'flex h-full w-full flex-col items-center justify-center space-y-4'}
>
{simbriefDataPending ? (
<CloudArrowDown
className={`${simbriefDataLoaded ? 'w-full justify-self-center' : ''} animate-bounce`}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const ATAChapterCard = ({ ataNumber, description, title }: ATAChapterCardProps)
<div className="flex w-1/5 items-center justify-center rounded-md bg-theme-accent font-title text-5xl font-bold">
{`ATA ${ataNumber}`}

<div className="size-0 relative -right-7 bottom-16 inline-block fill-current text-utility-red">
<div className="relative -right-7 bottom-16 inline-block h-0 w-0 fill-current text-utility-red">
{hasActiveFailure && (
<svg style={{ width: '30px', height: '30px' }} viewBox="0 0 20 20">
<circle cx={10} cy={10} r={5} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ export const A380Fuel: React.FC<FuelProps> = ({
</table>
</Card>{' '}
<A380FuelOutline
className="size-full absolute inset-x-0 right-4 top-20 mx-auto flex text-theme-text"
className="absolute inset-x-0 right-4 top-20 mx-auto flex h-full w-full text-theme-text"
feed1Percent={(Math.max(feedThreeGal * FUEL_GALLONS_TO_KG, 0) / OUTER_FEED_MAX_KG) * 100}
feed2Percent={(Math.max(feedThreeGal * FUEL_GALLONS_TO_KG, 0) / INNER_FEED_MAX_KG) * 100}
feed3Percent={(Math.max(feedThreeGal * FUEL_GALLONS_TO_KG, 0) / INNER_FEED_MAX_KG) * 100}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ export const A320Payload: React.FC<PayloadProps> = ({
</div>
{gsxPayloadSyncEnabled !== 1 && (
<div className="mt-4 flex flex-row">
<Card className="size-full" childrenContainerClassName="flex flex-col w-full h-full">
<Card className="h-full w-full" childrenContainerClassName="flex flex-col w-full h-full">
<div className="flex flex-row items-center justify-between">
<div className="flex font-medium">
{t('Ground.Payload.BoardingTime')}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ export const A380Payload: React.FC<PayloadProps> = ({
</div>
{gsxPayloadSyncEnabled !== 1 && (
<div className="mt-4 flex flex-row">
<Card className="size-full" childrenContainerClassName="flex flex-col w-full h-full">
<Card className="h-full w-full" childrenContainerClassName="flex flex-col w-full h-full">
<div className="flex flex-row items-center justify-between">
<div className="flex font-medium">
{t('Ground.Payload.BoardingTime')}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ export const PushbackPage = () => {

return (
<>
<div className="size-full relative flex flex-col space-y-4">
<div className="relative flex h-full w-full flex-col space-y-4">
{/* Map Container */}
<div className="flex grow flex-col space-y-4">
<PushbackMap />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ export const A320Services: React.FC = () => {
cabinRightStatus={cabinRightDoorOpen >= 1.0}
aftLeftStatus={aftLeftDoorOpen >= 1.0}
aftRightStatus={aftRightDoorOpen >= 1.0}
className="size-full inset-x-0 mx-auto text-theme-text"
className="inset-x-0 mx-auto h-full w-full text-theme-text"
/>

<ServiceButtonWrapper xr={930} y={24}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ export const A380Services: React.FC = () => {
main2LeftStatus={main2LeftDoorOpen >= 1.0}
main4RightStatus={main4RightDoorOpen >= 1.0}
upper1LeftStatus={upper1LeftDoorOpen >= 1.0}
className="size-full inset-x-0 mx-auto text-theme-text"
className="inset-x-0 mx-auto h-full w-full text-theme-text"
/>

<ServiceButtonWrapper xr={930} y={24}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const Navigation = () => {
}

return (
<div className="size-full">
<div className="h-full w-full">
<div className="relative">
<h1 className="font-bold">{t('NavigationAndCharts.Title')}</h1>
<Navbar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ export const LandingWidget = () => {
return (
<div className="flex h-content-section-reduced flex-row justify-between space-x-10 overflow-hidden">
<div className="w-full">
<div className="size-full flex flex-col justify-between">
<div className="flex h-full w-full flex-col justify-between">
<div className="mb-4">
<div className="mb-8 mt-4">
<p>{t('Performance.Landing.AirportIcao')}</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ export const TakeoffWidget = () => {
return (
<div className="flex h-content-section-reduced flex-row justify-between space-x-10 overflow-hidden">
<div className="w-full">
<div className="size-full flex flex-col justify-between">
<div className="flex h-full w-full flex-col justify-between">
<div className="mb-4">
<div className="mb-8 mt-4">
<div className="mt-4 flex flex-row justify-end">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export const AircraftPresets = () => {
<div className="flex h-20 flex-row items-center justify-center space-x-2 rounded-md border-2 border-theme-accent p-2">
{loadPresetVar ? (
<>
<div className="size-full content-center justify-center overflow-hidden rounded-md bg-theme-accent">
<div className="h-full w-full content-center justify-center overflow-hidden rounded-md bg-theme-accent">
<span className="h-1/2 pl-3 pt-1 text-xl">
{t('Presets.AircraftStates.CurrentProcedureStep')} : {currentStepDescription}
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ const QuickSettingsButton: FC<QuickSettingsButtonProps> = forwardRef<HTMLButtonE
ref={ref}
type="button"
onClick={onClick}
className={`size-12 flex items-center justify-center rounded-full bg-theme-body
text-theme-text transition duration-100 hover:border-4 hover:border-theme-highlight
className={`flex h-12 w-12 items-center justify-center rounded-full
bg-theme-body text-theme-text transition duration-100 hover:border-4 hover:border-theme-highlight
${className ?? ''}`}
{...rest}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const GroundSpeedAuto = () => {
return (
<div className="flex flex-col items-center justify-center">
<div className="absolute top-0 flex w-full flex-row items-center space-x-4 bg-theme-accent p-2">
<div className="size-6 shrink-0 rounded-full bg-theme-highlight" />
<div className="h-6 w-6 shrink-0 rounded-full bg-theme-highlight" />
<p>{t('Performance.TopOfDescent.GroundSpeed.FetchingSpeedFromSimulator')}</p>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const Toggle = ({ value, onToggle, disabled }: ToggleProps) => (
onClick={() => !disabled && onToggle(!value)}
>
<div
className={`size-6 mx-1.5 rounded-full bg-white transition duration-200 ${value && 'translate-x-5 !bg-theme-highlight'}`}
className={`mx-1.5 h-6 w-6 rounded-full bg-white transition duration-200 ${value && 'translate-x-5 !bg-theme-highlight'}`}
/>
</div>
);

0 comments on commit f70f617

Please sign in to comment.