Skip to content
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

AlbumCard size problem #15

Closed
theilgaz opened this issue Jan 28, 2022 · 18 comments · Fixed by #47
Closed

AlbumCard size problem #15

theilgaz opened this issue Jan 28, 2022 · 18 comments · Fixed by #47
Labels
bug Something isn't working

Comments

@theilgaz
Copy link
Contributor

theilgaz commented Jan 28, 2022

Describe the bug
AlbumCard header and detail texts are not fit well.

To Reproduce
Steps to reproduce the behavior:

  1. Launch App
  2. Type "kazılı kuyum" to search box.

Expected behavior
Same width and same height for each AlbumCard.

Screenshots
image

@theilgaz theilgaz added the bug Something isn't working label Jan 28, 2022
@KRTirtho
Copy link
Owner

Actually, it's not a bug rather a design decision😅

AlbumCard displays the album name & the artists with it. The length of those text can be anything & the card will grow to cover that text. But if I use fixed dimensions (e.g. SizedBox) the too much lengthy text can overflow & I'll have to use TextOverflow .ellipsis or something equivalent to hide that overflowing text. But it'll show incomplete name & artist which isn't really a good thing. And I can't compromise data visibility for design

But if you find any better solution for it, please suggest, if possible create a PR with that implementation. I'll review it & approve accordingly😃

@theilgaz
Copy link
Contributor Author

As far as I can see, the basic design is just for small band names and small album titles. We might be able to update those field heights for two lines so that long and small titles preserve design standards.

@KRTirtho
Copy link
Owner

That works but it'd make the PlaylistCard look weird with those extra empty space since both PlaylistCard & AlbumCard inherit from PlaybuttonCard

I think the best solution will if the smaller AlbumCard grows to fill that empty space created by the longer AlbumCard. Something similar to flex-grow: 1 in CSS. But the problem is I don't know any kind of widgets other than Flexible that can do that. But Flexible doesn't work inside Wrap

@SteliosPapamichail
Copy link
Contributor

@KRTirtho Can't the song/album name(s) support auto-scrolling? That would fix the inconsistency since you can decide on letting the text overflow after a maximum of 1(or N) lines and then have it scroll horizontally, automatically and then looping back again. If that fits the look and feel of this project I'd be glad to take a look at implementing it.

@KRTirtho
Copy link
Owner

You mean Marquee text? I guess that's acceptable. Actually it's a great idea. I think pub.dev has a marquee package that does this exact job

@SteliosPapamichail
Copy link
Contributor

You mean Marquee text? I guess that's acceptable. Actually it's a great idea. I think pub.dev has a marquee package that does this exact job

Yup, I had forgotten the technical name for it. I can take a look at implementing it into the existing codebase If that's alright with you :) This package seems to be a popular one.

@KRTirtho
Copy link
Owner

Wow that'd really great if you manage to that for this project. It'd really help the project. When you're done implementing marquee text just submit a PR. I'll gladly look into it

@SteliosPapamichail
Copy link
Contributor

Sure thing @KRTirtho I'm already on it! I'd just like some help setting up the secrets for the repository and instructions on how to generate the secrets file that is used in the app from the models package. I saw an issue of someone with the same questions but the answer sadly wasn't sufficient for me to generate the required credentials and the secrets file :)

@KRTirtho
Copy link
Owner

I've documented generating secrets locally in the README in here
You'll need your own list of Spotify clientId & clientSecret along with genius accessToken

@SteliosPapamichail
Copy link
Contributor

I've documented generating secrets locally in the README in here You'll need your own list of Spotify clientId & clientSecret along with genius accessToken

Thanks for the link! Sadly, the documentation of the secret-related process is somewhat abstract from my point of view. Here are a couple of questions that arose after reading the README.md:

  1. You mention "Create a .env file". Where should this file be saved? Will it only contain the JSON?
  2. "These secrets should be a base64 encoded JSON string". Is this the correct format for the .env file? If not, could you please provide an example? I think it would be really helpful to have a fully documented process regarding this phase.
  3. Finally, the $ dart bin/create-secrets.dart --loadEnv command is mentioned. Simply running it throws a "FormatException". The bin/create-secrets.dart file seems to expect 2 arguments (I'm guessing the secrets?). How should we (as contributors), execute this command? How do we specify the .env file (which I imagine is what it's expecting to see) so that the secrets can be generated?

P.S. In the sample JSON secret fields, you have included the // and so on .... part. Does this hint that other fields are necessary as well or is this a random placeholder?

Thank you in advance! Once I've got the whole process figured out, I'll start the implementation!

@KRTirtho
Copy link
Owner

You mention "Create a .env file". Where should this file be saved? Will it only contain the JSON?

Create the .env file in the root of the project & it should contain the two base64 encoded string of JSON of particular env vars

"These secrets should be a base64 encoded JSON string". Is this the correct format for the .env file? If not, could you please provide an example? I think it would be really helpful to have a fully documented process regarding this phase

No, The file should look somewhat like this:

LYRICS_SECRET=ICBbCiI1ZjdjZjA0My00ZmQyLTQwMmEtOGE4My1iMjc1MmRlZWZlNWIiLAoiN2U3ZDJhOGYtYTZiYi00NGNjLTg2Y2EtMGRhMGRmMjcwNTU0IiwKIjhkZTQxMWVlLWM0NzYtNGU5Ny1hNGZlLTdiMjRhMzk2NDAxNiIsCiJiOTcyNDkzNi0xMjY4LTQ1MzUtOTg2MC0zODE2N2M4N2JjOGIiLAoiNGYzMjQ5NWItY2ZlNC00ODA2LTk4Y2UtZTYyZjhmNWMxZWQ3MWEKICBd
SPOTIFY_SECRET=ICBbCiAgICB7ImNsaWVudElkIjogIjdmN2RmYTcyLWE2OTUtNDUxOC1hZWUyLWQ0NjI1OGRkNTJiYyIsICJjbGllbnRTZWNyZXQiOiAiOTdlZjZmMDctMWE4NC00Zjc0LWEzZDMtYTIyY2I0ODIwMzBhIn0sCiAgICB7ImNsaWVudElkIjogIjVmMmNkMzExLTE5MzgtNDY4Ny05MTA2LWQxYzljYjRmMjhmYSIsICJjbGllbnRTZWNyZXQiOiAiZmY0MWZhZGUtOTIxNS00NjFkLTgyNTQtZTBiNDY5MjA2MTFhIn0KICBd

The raw json format before getting base64 encoded,

  • LYRICS_SECRET:
    [
     "5f7cf043-4fd2-402a-8a83-b2752deefe5b",
     "7e7d2a8f-a6bb-44cc-86ca-0da0df270554",
     "8de411ee-c476-4e97-a4fe-7b24a3964016",
     "b9724936-1268-4535-9860-38167c87bc8b",
     "4f32495b-cfe4-4806-98ce-e62f8f5c1ed71a"
    ]
  • SPOTIFY_SECRET:
    [
      {"clientId": "7f7dfa72-a695-4518-aee2-d46258dd52bc", "clientSecret": "97ef6f07-1a84-4f74-a3d3-a22cb482030a"},
      {"clientId": "5f2cd311-1938-4687-9106-d1c9cb4f28fa", "clientSecret": "ff41fade-9215-461d-8254-e0b46920611a"}
    ]

Finally, the $ dart bin/create-secrets.dart --loadEnv command is mentioned. Simply running it throws a "FormatException". The bin/create-secrets.dart file seems to expect 2 arguments (I'm guessing the secrets?). How should we (as contributors), execute this command? How do we specify the .env file (which I imagine is what it's expecting to see) so that the secrets can be generated?

You've to use dart bin/create-secrets.dart --loadEnv & not with the $ sign. It just indicates its a shell command. And you've to do the .env configuration before running the commands. The Exception is only thrown when you didn't provide even a single argument

P.S. In the sample JSON secret fields, you have included the // and so on .... part. Does this hint that other fields are necessary as well or is this a random placeholder?

Its just saying if you want to pass more secrets to the Array, you can

@KRTirtho
Copy link
Owner

@SteliosPapamichail Did you manage to configure secrets locally?

@SteliosPapamichail
Copy link
Contributor

@SteliosPapamichail Did you manage to configure secrets locally?

Nope, I created the file just like you mentioned but same error with the command. I also had another dev friend try it and they had the same issue.

@KRTirtho
Copy link
Owner

I've to find a easier way to create these secrets locally

@SteliosPapamichail
Copy link
Contributor

I've to find a easier way to create these secrets locally

Yeah, it would be great if the contributing process was easier and fully documented. If we ever manage to get my case working I'll update the Contributing.md file as well to help others.

@KRTirtho
Copy link
Owner

I've made the secret creation process a bit easier & updated the CONTRIBUTION.md too. I guess you can get started now without any problems

@SteliosPapamichail
Copy link
Contributor

I've made the secret creation process a bit easier & updated the CONTRIBUTION.md too. I guess you can get started now without any problems

Excellent job with the contribution instructions. This made everything so much easier. I've already submitted my PR for review, so let me know if there are any changes required over on the PR thread!

@KRTirtho
Copy link
Owner

KRTirtho commented Apr 1, 2022

Great work @SteliosPapamichail

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants