-
Notifications
You must be signed in to change notification settings - Fork 28
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
UI & UX Changes #30
UI & UX Changes #30
Conversation
…ation out of launcher.js and into launcher.html; allows for easier manipulation; script gets elements by ID.
…le building/launching. Changed comments in launcher.js to reflect how they work now. Moved the tailwind.config.js back to the project root.
Made settings more dynamic. Moved log in & out. Swapped theme svg.
src/library/plugin.c
Outdated
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.
When trying to build on Fedora 39, LUA_GLOBALSINDEX kept throwing an error.
Seems to be a version issue? The solution was to change to LUA_REGISTRYINDEX; based on this GitHub post:
poelzi/ulatencyd#51
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.
The removal of LUA_GLOBALSINDEX was a widely unpopular change from Lua 5.1 to 5.2, but Bolt uses LuaJIT which is based on 5.1, so most likely you're building against the wrong version. In any case, unless you want to use the highly experimental RS3 plugin loader, you can entirely turn off the Lua dependency with -D BOLT_SKIP_LIBRARIES=1
.
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.
Ah I see, my system is on Lua 5.4. I will revert this change.
The second drop-down seems buggy now. I have two game accounts on my Jagex account but when I log in it only shows the first one. If I log in again, the top drop-down has two entries in it as expected, but after switching between them the bottom one either has 1 or 0 entries in it, when it should always have 2. |
Well, to be honest I was hoping someone would do this so I wouldn't have to do it myself, so thank you. I have a few points of feedback on the PR itself.
|
I was worried I introduced some kind of bug like this. I only have one account with one character so my testing was pretty limited. I will look into this and expand my testing! |
Glad to hear these changes are welcome!
I appreciate the comments and feedback! I'll fix things we discussed above. Let me know what you think about adding a front end framework. Thanks for you time! Cheers |
React or similar would be nice if you can add it. It can make the build system quite bloated but the generated code in release mode is really small in my experience, so that's fine with me. There's also another issue, that anything involving npm is a massive headache to use in build systems such as Flatpak. I think the best solution to this is to commit packed sources to the repo and include an optional build step explaining how to repack them if people want to do that. I saw you've already committed tailwind's output.css. On the other hand if you think React would make the page slower to load or interact then I trust your judgement, you seem to know what you're talking about. It seems like it would reduce development overhead a lot though, it's quite a chore to add features to right now as I'm sure you've noticed. |
That's fine, thanks, just checking |
Agreed that a front end framework would make development a lot easier! just need to figure out some nuances like you mentioned. Yeah, committing the tailwind output was to allow people to just use it or repack it. I should clarify that I am a fan of using frameworks but am by no means an expert. I think their performance shouldn't be an issue. Companies like Netflix and Facebook rely on React for their apps, and they run great. Lol yeah good point, it was a bit of a chore! I'll experiment with adding a framework and converting the html/js to using it. Then, report my findings and/or commit what I have working. Thanks for the feedback. |
@TormStorm thanks for the feedback! I agree that the UI in its current state looks a little off. I spent a lot of time moving things around and have yet to be totally happy with it. You might be right, maybe I should take some design choices from the official launcher, which implements a few things you mentioned. I will post new screenshots as I have them to see what people think. |
Ooo yeah I like where you were going with that a lot. I think as I try to construct the interface using a framework I will try to move things around to mimic yours and the official launcher a bit more. I appreciate the inspiration! |
Hey, just wanted to give an update with what I have been up to regarding UX changes and introducing a framework! UXConsidering I was going to be taking the UI apart, I decided to do a redesign that I think is a lot better.
FrameworkI did a bit of research before deciding on an implementation.
Here is what the file structure looks like, in a new folder called 'app', which would replace 'html': Next TaskThe next thing I am working on is moving the 'launcher.js' code into respective components. This is going to take more of my time to implement I think. Reasons being I did the good old foot gun technique by introducing TS and having loads of errors in the original JS file; and relocating / refactoring the code will require me to understand it a lot more to ensure I move things where they belong while not introducing bugs. Thanks for reading my update. Let me know what you all think! I look forward to your comments, suggestions, and questions. Cheers |
Thanks, I appreciate you giving updates. If you're taking launcher.js apart then it'll be important to know that getting a |
Yeah of course! Good to know, I will look to removing anything using |
Hello again, hope the weekend is going well! I wanted to give another update and push my changes for others to look at. The frontend has been moved into Some key updates and additions since the last update
Current tasks
Overall, I am happy with the progress I have made. I look forward to what you all think! Feedback, comments, concerns, and questions are appreciated. Let me know any bugs you find and I will set out to fixing them asap. Thanks |
There is an exception to this, and that is for url params and APIs.
Game and client work, but characters isn't being parsed from the config file into a map. Need another solution.
Bolt/app/src/lib/TopBar.svelte Line 47 in 5f5d83b
Don't put the company name in the repo please. |
Yeah I know about bun. It certainly runs better and has a nice build system (zig.) There are a few things I don't like about it but none of them are relevant here. |
Okay, last few issues:
Beyond that I agree, this is about ready to go. |
Thanks for finding some more bugs! It is funny how the order in which I Implemented things meant I never saw that undefined time one. I just pushed a couple changes that fix everything you mentioned. Let me know if you have anything else regarding style/code you want me to change. |
Ah, just found another problem, and I really should've tested this sooner: logins expire after 30 minutes. Okay, so, when a set of oauth credentials is granted by the login server, it has an "expiry" field which usually indicates a time 30 minutes after it was granted. If that has expired, you won't be able to use the credentials anymore for things like the displayName endpoint, but you can still use the refresh_token to renew them. checkRenewCreds renews them if they're expired. I've just checked. 28 minutes after being granted, works fine. 32 minutes after being granted, I get a 401 from displayName. Which either means checkRenewCreds isn't being called or the new credentials aren't being saved to the file. (Or perhaps checkRenewCreds has been changed to operate by value instead of by reference?) |
Yeah, I did notice weird behavior with the login expiring. I chalked it up to the dev environment but guess I shouldn't have assumed that. I will look into fixing it right now. |
Well I think there is a separate issue where the hot-reload will re-use an old version of the credentials file. That one's my fault, not yours - you might want to turn off hot-reloading while you're investigating. |
I'm not having too much luck getting passed the xml.send request. I always get this 400 response: {
"error": "invalid_grant",
"error_description": "The provided authorization grant (e.g., authorization code, resource owner credentials) or refresh token is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client."
} Leads me to assume something is wrong with the token. I am not super familiar with refresh tokens, but I am looking into it. Any ideas? |
Just pushed a fix to master for the hot-reload issue if that's any help. That's the most generic error message unfortunately. Can you show what request you're sending, with the sensitive parts censored out? |
Okay I merged your change in.
Yeah people online say finding the cause of this error can be a bit of a pain haha. |
For me, taking the refresh_token from my creds file and putting into this request, I got a 200 response with some new credentials: |
Nevermind, I think I made a copy-paste error last time. It works every time now. So what are you doing differently from that? |
I think my problem had to do with these lines here in checkRenewCreds. These are your original lines. const c = parseCredentials(xml.response);
if (c) {
Object.assign(creds, c);
credentialsAreDirty = true;
resolve(null);
} Javascript does like weird pass by reference where you can modify what is inside an object but by reassigning you don't effect the original copy. 'creds' comes in as a parameter. I changed these lines here and I don't think I was assigning the fields properly due to a 'find and replace' bug. I am testing now, gonna let my login expire and see what happens. |
…1/Bolt into ux/gui-changes-add-tailwindcss
Okay I think I've got it working. I testing by forcing my login to send a refresh on every boot and it was working. |
Yep I can't find any more issues with this. Thanks for your hard work. |
Awesome! Great to have it merged in, thanks for the help and feedback throughout. |
@smithcol11 I just found an issue in your PR by coincidence while testing something else. If you have multiple game accounts under one jagex account, the drop-down menu visually seems like it remembers which account you had selected, but if you click the play button it will always launch the first listed account unless you explicitly change it to a different one. Do you know why that would be the case? |
Yeah I have an idea; I keep track of the currently selected account, character, game, etc. I must not be setting it when it loads up preferences for that. I will look into it and open a PR soon, should be an easy fix I imagine. |
Okay thanks. From what I've learned about Svelte so far I think this menu could be done with fewer variables than this. It says a Select's "value" attribute is the same as the "value" of the currently selected Option, and an Option's "value" can be anything, not just a string. So, if you use the But that's just how I'd look at it. I'll leave it up to you since it's your PR. |
Hello, I have been a big fan of the project and wanted to give back in some way!
I am not sure if there have been plans to update the UI/UX, but I thought I would throw something together to see what you and others thought. As far as I can tell I haven't introduced any problems or regressions in functionality.
Key Changes
Screenshots of Updated UI/UX
Thoughts
I am very keen and open to hearing your feedback. I am aware that this is likely just a draft or something you will scrap entirely. Please reach out with questions and suggestions!
Cheers