Closed Martysh12 closed 3 months ago
what is that 🫠
Looks like the OpenGL implementation on my phone doesn't like ternary operations with custom structs.
No, the Toast cannot be enlarged, unfortunately. From Toast redesign:
In Android 12, the toast view has been redesigned. Toasts are now limited to two lines of text and show the application icon next to the text.
A modern alternative would be a Bottom Sheet, I guess.
And about the missing error message: these come directly from the OpenGL driver on the phone, and yes, they can be very different or even completely missing 🤷♂️ Unfortunately, there's nothing the app can do about this. Apart from including a GLSL compiler/linter, which would be overkill, of course.
Another alternative would be to make the top bar draggable and move the full error messages there. Then one can additionally keep the old behavior of creating a Toast for the first error.
Here is a recording of my (crude) shader-editor app I made a few years ago:
https://github.com/markusfisch/ShaderEditor/assets/94118572/c2a9690c-a204-4b48-a6f1-3e6f582c73bd
Yes, this would be another option, indeed!
My only concern would be that a user would have to know that he/she can pull down the top bar for more information 🤔
That's also what I thought when creating this. I have rounded the bottom corners a bit to show that it is a bigger surface (because the top has no rounded corners), but adding another handle icon (like iphone X's bottom handle for navigation) could help UX as well. Also a Problems icon could conditionally show up that opens the problems section when pressed.
It would be nice to have the errors show up without giving away the focus from the editor, so if you have a bunch of errors you don't have to jump between the error view and the editor.
Well, if all four were to be implemented, would that solve this problem? Feel free to suggest improvements.
Well, if all four were to be implemented, would that solve this problem? Feel free to suggest improvements.
This application sorely needs these updates.
A single error message, displayed via a temporary toast of finite length, is the worst possible solution for this scenario, at any rate.
This should be a high priority issue.
@Zabadam I am sorry this is taking so long. This also is a high priority issue for me and I want to work on this👍 However to truly implement this the way I envision this to work, I first need the space on the top bar. That is why I redesigned the menu (#173) (to potentially add custom widgets in there) and why I'll first implement the shortcut bar (#175) to move the tab icon away from this menu. Then there is enough space to add a "show errors" icon😉 Because I have already implemented a similar (yet still prototype) feature for my own shader editor for learning purposes, the rest will be fairly easy.
So having said all this, I am finally getting to work on this and you can hopefully expect this feature in the coming month🤞
@AntonPieper That's great to hear! Reading back, I came off as harsh. Truthfully I wish I could contribute. Good luck and thank you.
@AntonPieper That would be awesome! 👍
And sorry that I currently don't have the time to bring the app much further. I really do appreciate your excellent work on it!
In case you guys are wondering what is taking so long:
My prototype used a third-party dependency for the top sheet behavior (and also a coordinator layout for the main layout), which is something I don't really want to use here. There really seems to be no maintained version of the BottomSheetBehavior "mod". Also, refactoring the layout to use a coordinator layout has its quirks as well.
I am reconsidering how I should implement this. Maybe even a simple bottom sheet behavior for the errors could maybe work (would only be accessible by clicking on some icon in the toolbar) together with a snack bar with a go to error action.
What do you guys think of this?
@AntonPieper I think a Snackbar with a button (that shows the full error message) might be a good solution.
Thinking about this, I couldn't stop myself from implementing it so there is this commit now 😉
Problem
Errors that are too long will get trimmed by Android.
Solution
I don't know if it's possible to change the maximum length of a toast in Android. If it isn't, I suggest replacing the error toasts with a small panel in the bottom of the editor that displays the latest error (just like Bonzomatic, but smaller).