ATLauncher
ATLauncher copied to clipboard
Add "About Tab"
Description of the Change
Adds about tab, providing information regarding the launcher.
Testing
Seems ready to go!
Related Issues
#304
How did I violate a License? This is GPLv3
How did I violate a License? This is GPLv3
You need to run https://github.com/ATLauncher/ATLauncher#updating-license-headers-in-all-files to ensure all new files have the correct license header
Progress report:

I am not the best at swing, but this is what I have currently. Can someone help me with constraints? I want everything to spread out better.
Second roadblock for quality. I would like to have it so that each author/contributor has their profile picture included as a memento.

About tab has reached this state.
Any suggestions for improvement?
@Doomsdayrs With the authors, I think displaying them in a grid would help fill up the space and prevent the user from having to scroll horizontally. Displaying the authors in a grid would probably make it easier to include images by having their profile picture and their name stacked on top of each other
Current appearance.


@RyanTheAllmighty any clue why BoxLayout causes alignment issues?

Note the launcher name, contributors, acknowledgements and images being not centered.
@RyanTheAllmighty any clue why BoxLayout causes alignment issues?
Note the launcher name, contributors, acknowledgements and images being not centered.
@Doomsdayrs That's very odd, I would think it would either be fully left, fully right or in the middle, but it's none of those. That's strange.
If it helps you can press Ctrl + Shift + Alt + X in one go and it'll activate inspect mode and you can see how the UI is all laid out, maybe that might help?
@RyanTheAllmighty any clue why BoxLayout causes alignment issues?
Note the launcher name, contributors, acknowledgements and images being not centered.
@Doomsdayrs That's very odd, I would think it would either be fully left, fully right or in the middle, but it's none of those. That's strange.
If it helps you can press Ctrl + Shift + Alt + X in one go and it'll activate inspect mode and you can see how the UI is all laid out, maybe that might help?
So in the end, the solution was to use Box.createHorizontalGlue() and wrap the label in a Box.createVerticalBox() with the glue.
This is the current layout.

Anything else you want to add?
Looks good. Do contributors link off to their GitHub profiles? Might be an idea
Looks good. Do contributors link off to their GitHub profiles? Might be an idea
This is based off git, it would be unreliable to assume the username matches the profile.
Hmm, I might see about generating it from GitHub api instead then at build time, for now this is good though, I just need to figure out the last few pieces of where the data will come from and when it gets generated
Hmm, I might see about generating it from GitHub api instead then at build time, for now this is good though, I just need to figure out the last few pieces of where the data will come from and when it gets generated
I will parse it off this then https://api.github.com/repos/atlauncher/atlauncher/contributors
Hmm, I might see about generating it from GitHub api instead then at build time, for now this is good though, I just need to figure out the last few pieces of where the data will come from and when it gets generated
To build off my previous statement.
Where do I cache the response from github? Also, this likely needs a token for use in production.
Currently my plan is to create the following
GithubRepositorySource of Truth for data from GitHub.{Cache, File, GitHub}ContributorDataSourcedata sources, that provide the data for the repository.
I'm thinking it will likely be a GitHub action to do this and commit it after every commit into some file in resources. Likely reuse https://github.com/minicli/action-contributors which at a very quick glance can do it.
I'm thinking in src/main/resources/about.json something simple like:
{
"contributors": [
"RyanTheAllmighty",
"atlauncher-bot",
"jamierocks"
],
"acknowledgements": "Some text\nWith new lines",
"libraries": "[Some Library](https://google.com)\n[Some Library](https://google.com)\n[Some Library](https://google.com)",
"license": "Some text\nWith new lines"
}
Something simple like that, which can just be chucked through Markdown.render() util and displayed.
Or thinking even easier, since only the contributors is dynamic, the rest are static text, maybe can just be chucked directly into the About UI components directly and not worry about having to parse anything for those, then just have src/main/resources/contributors.json be a simple array:
[
"RyanTheAllmighty",
"atlauncher-bot",
"jamierocks"
]
Or even just a simple text file with one name per line.
I'm thinking it will likely be a GitHub action to do this and commit it after every commit into some file in resources. Likely reuse https://github.com/minicli/action-contributors which at a very quick glance can do it.
I feel like after every commit is a bit much, a better idea is a manual action just before releases to make sure its up to date then. Or maybe after every merge request.
I'm thinking in
src/main/resources/about.jsonsomething simple like:{ "contributors": [ "RyanTheAllmighty", "atlauncher-bot", "jamierocks" ], "acknowledgements": "Some text\nWith new lines", "libraries": "[Some Library](https://google.com)\n[Some Library](https://google.com)\n[Some Library](https://google.com)", "license": "Some text\nWith new lines" }Something simple like that, which can just be chucked through
Markdown.render()util and displayed.
I can agree on this, a local load would be better then a network load.
Or thinking even easier, since only the contributors is dynamic, the rest are static text, maybe can just be chucked directly into the About UI components directly and not worry about having to parse anything for those, then just have
src/main/resources/contributors.jsonbe a simple array:[ "RyanTheAllmighty", "atlauncher-bot", "jamierocks" ]
This is a bit annoying in my opinion, as it relies manual action to apply it to the class.
Or even just a simple text file with one name per line.
Simple, and can be maintained as an AUTHORS file. But I feel like it would be a bit hard to store information this way, such as profile picture etc.
Alright, I updated this PR so we can merge it.