ATLauncher icon indicating copy to clipboard operation
ATLauncher copied to clipboard

Add "About Tab"

Open Doomsdayrs opened this issue 3 years ago • 20 comments

Description of the Change

Adds about tab, providing information regarding the launcher.

Testing

Seems ready to go!

Related Issues

#304

Doomsdayrs avatar Apr 15 '22 04:04 Doomsdayrs

How did I violate a License? This is GPLv3

Doomsdayrs avatar Apr 15 '22 04:04 Doomsdayrs

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

RyanTheAllmighty avatar Apr 15 '22 04:04 RyanTheAllmighty

Progress report:

Screenshot from 2022-06-12 01-09-16

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.

Doomsdayrs avatar Jun 12 '22 05:06 Doomsdayrs

image

About tab has reached this state.

Any suggestions for improvement?

Doomsdayrs avatar Jun 13 '22 17:06 Doomsdayrs

@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

JJeeff248 avatar Dec 04 '22 20:12 JJeeff248

Current appearance.

image

Doomsdayrs avatar Apr 08 '23 01:04 Doomsdayrs

image

Doomsdayrs avatar Apr 08 '23 03:04 Doomsdayrs

@RyanTheAllmighty any clue why BoxLayout causes alignment issues? image

Note the launcher name, contributors, acknowledgements and images being not centered.

Doomsdayrs avatar Apr 13 '23 01:04 Doomsdayrs

@RyanTheAllmighty any clue why BoxLayout causes alignment issues? image

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 avatar Apr 13 '23 08:04 RyanTheAllmighty

@RyanTheAllmighty any clue why BoxLayout causes alignment issues? image 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.

Doomsdayrs avatar Apr 16 '23 17:04 Doomsdayrs

This is the current layout. image

Anything else you want to add?

Doomsdayrs avatar Apr 16 '23 17:04 Doomsdayrs

Looks good. Do contributors link off to their GitHub profiles? Might be an idea

RyanTheAllmighty avatar Apr 16 '23 23:04 RyanTheAllmighty

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.

Doomsdayrs avatar Apr 17 '23 00:04 Doomsdayrs

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

RyanTheAllmighty avatar Apr 17 '23 01:04 RyanTheAllmighty

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

Doomsdayrs avatar Apr 17 '23 01:04 Doomsdayrs

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.

Doomsdayrs avatar Apr 17 '23 01:04 Doomsdayrs

Currently my plan is to create the following

  • GithubRepository Source of Truth for data from GitHub.
  • {Cache, File, GitHub}ContributorDataSource data sources, that provide the data for the repository.

Doomsdayrs avatar Apr 17 '23 01:04 Doomsdayrs

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.

RyanTheAllmighty avatar Apr 17 '23 01:04 RyanTheAllmighty

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.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.

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.json be 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.

Doomsdayrs avatar Apr 17 '23 01:04 Doomsdayrs

Alright, I updated this PR so we can merge it.

Doomsdayrs avatar Nov 08 '23 14:11 Doomsdayrs