Skip to content

Conversation

alexanderroidl
Copy link
Contributor

@alexanderroidl alexanderroidl commented Jul 26, 2025

This MR aims to:

  • Make a few titles and explanations more straight-forward and intuitive.
  • Make the UI more responsive to mobile devices.

Style changes preview:

As an example an iPhone 12 was used as mobile.

UI Device Before Now
Jobs 💻 jobs-desktop jobs-desktop-neu
📱 jobs-scroll-mobile jobs-scroll-mobile-neu
Login 💻 login-empty-desktop login-empty-desktop-neu
📱 login-empty-mobile login-empty-mobile-neu
Login (Error) 💻 login-required-desktop login-required-desktop-neu
📱 login-required-mobile login-required-mobile-neu

@alexanderroidl alexanderroidl marked this pull request as ready for review July 26, 2025 12:47
@@ -38,7 +38,7 @@ export default function JobMutator() {
const dispatch = useDispatch();

const isSavingEnabled = () => {
return notificationAdapterData.length > 0 && providerData.length > 0 && name != null && name.length > 0;
return notificationAdapterData.length && providerData.length && name;
Copy link
Owner

Choose a reason for hiding this comment

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

this is not exactly the same check than I had. in your case, setting name to ' ' would resolve truthy...

Copy link
Contributor Author

@alexanderroidl alexanderroidl Jul 31, 2025

Choose a reason for hiding this comment

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

You're right, it leads to a different result. I didn't notice that, it should be wrapped in a Boolean constructor.

The thing is,

console.log(Boolean('')) // false

Assuming notificationAdapter.length=1 and providerData.length=1 and name='':

console.log(1 && 1 && ''); // ''

It works when wrapped though:

console.log(Boolean(1 && 1 && '')); // false
console.log(Boolean(1 && 1 && 'a')); // true
console.log(Boolean(1 && 1 && 'anythingelse')); // true

@@ -27,20 +27,24 @@ export default function Login() {
}, []);

const tryLogin = async () => {
if (username.length === 0 || password.length === 0) {
setError('Username and password are mandatory.');
if (!username?.trim() || !password) {
Copy link
Owner

Choose a reason for hiding this comment

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

Tbh, I thought about using a toast here as well, but found that showing the in the login form directly looks nicer, therefor I think using a toast here is not ideal

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You meant just here, right? I changed it back, let me know if that's better :)

Copy link
Owner

Choose a reason for hiding this comment

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

👍🏼

@orangecoding orangecoding merged commit ae4b6d1 into orangecoding:master Aug 1, 2025
2 checks passed
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