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

Refine CSS of text in image box on home page for various page widths #4120

Closed
oorjitchowdhary opened this issue Dec 5, 2018 · 38 comments
Closed
Labels
CSS fto-candidate issues which are meant to be solved by first timers but aren't well-formatted yet good first issue help wanted requires help by anyone willing to contribute HTML stale

Comments

@oorjitchowdhary
Copy link
Member

Please describe the problem (or idea)

The default Public Lab introduction text on the homepage is missing in the mobile view.

What happened just before the problem occurred? Or what problem could this idea solve?

image-1

What did you expect to see that you didn't?

This is the default introduction text on our desktop page.

screenshot 45

Please show us where to look

https://publiclab.org

What's your PublicLab.org username?

oorjit_chowdhary

Browser, version, and operating system

Safari, iOS


Thank you!

Your help makes Public Lab better! We deeply appreciate your helping refine and improve this site.

To learn how to write really great issues, which increases the chances they'll be resolved, see:

https://publiclab.org/wiki/developers#Contributing+for+non-coders

@oorjitchowdhary
Copy link
Member Author

@publiclab/mentors What should be done here...

@digitaldina
Copy link
Collaborator

@oorjitchowdhary I think this was done on purpose since the intro paragraph is long and shouldn't be the first thing users see on a small mobile screen. I'm pretty sure that after they scroll down, they'll see more about what publiclab is. I don't think adding this is necessary..

@SidharthBansal
Copy link
Member

@oorjitchowdhary I agree with @dinaelhanan. What do you say @jywarren?

@jywarren
Copy link
Member

jywarren commented Dec 6, 2018

Yes, this was intentional. However, if we could restate the problem, we could really use a solution -- the text does not evenly scale as the screen width changes (try uploading a gif to demonstrate this!) and the break points are not good. I wonder if there is some clever CSS we could use to make the font scale more evenly with the size of the image. Or some other way to deal with text flowing nicely in a variably sized box. This could be some really helpful research... there are a lot of powerful CSS tricks out there, and I'm sure someone's dealt with this. We'd be comfortable not showing the entire image, too, if that's helpful.

@jywarren jywarren changed the title Default intro text is missing in mobile view Refine CSS of text in image box on home page for various page widths Dec 6, 2018
@digitaldina
Copy link
Collaborator

@jywarren is this similar? https://stackoverflow.com/a/16346076

@jywarren
Copy link
Member

jywarren commented Dec 6, 2018 via email

@digitaldina
Copy link
Collaborator

@jywarren Ok, then I think as part of : #4062 this should be the first step (kinda like an intro to changing up the style) so if you can make a task for this, I will take it up right away. Thanks!

@SidharthBansal
Copy link
Member

Ok I am creating a task for this issue.

@SidharthBansal
Copy link
Member

@digitaldina
Copy link
Collaborator

@SidharthBansal thanks! I just need this to be approved if you can :
https://codein.withgoogle.com/dashboard/task-instances/4824240835526656/

@SidharthBansal
Copy link
Member

I am little cautious, let's wait for @jywarren to approve it

@digitaldina
Copy link
Collaborator

@SidharthBansal sounds good!

@jywarren
Copy link
Member

jywarren commented Dec 6, 2018

👍 Awesome!

@jywarren
Copy link
Member

jywarren commented Dec 6, 2018

And be aware -- this code is currently stored in the database, rather than in the codebase. So it's editable by site admins. But that means the solution for this will be probably stylesheets and a screenshot rather than a PR. The code driving this on the site is here:

https://gist.github.com/jywarren/b137484ae621dc00a4c48537fd00386b

I hope this makes sense. It's a little weird, but we often don't consider images or content text to be part of the codebase, and we like the flexibility of being able to edit the front page as if it were a blog post, to keep making tweaks.

Make sense?

@jywarren
Copy link
Member

jywarren commented Dec 6, 2018

Locally you can work by logging in as admin, and going to https://localhost:3000/features/... an admin-only feature, and creating a new feature called "home-carousel", like this:

image

Then you can paste in the code from the gist above -- and it'll show up on your local installation's home page for testing.

@digitaldina
Copy link
Collaborator

digitaldina commented Dec 9, 2018

@jywarren ok so I did all the steps above while on cloud9. I deleted all the image divs and just left one:

<div><img alt="fanboat" src="../dinaelhanan/app/assets/images/1.jpeg" /></div>

I uploaded a file on cloud9 so that I can at least see the carousel instead of just the alt text of the images. I did this file path since this is the file path of my image:
screenshot from 2018-12-07 21-45-25

It's not working... I added this to the end of the style tag in your gist to see if my vw css trick would work:

h1.lead-text
{
   font-size: 3vw;
}

however I'm still just seeing the image's alt code... @SidharthBansal @sagarpreet-chadha maybe you could also help out? @ValentinaTironi maybe you could also help:)

@jonxuxu
Copy link
Member

jonxuxu commented Dec 9, 2018

Are you getting any errors in your browser console or rails console?

@digitaldina
Copy link
Collaborator

there's no errors it's just that I can't get the carousel to showup @JonathanXu1

@jonxuxu
Copy link
Member

jonxuxu commented Dec 9, 2018

Hmm I haven't used the carousel before, I'll look into it

@digitaldina
Copy link
Collaborator

@JonathanXu1 alright, thanks!

@digitaldina
Copy link
Collaborator

digitaldina commented Dec 9, 2018

@JonathanXu1 @SidharthBansal I realized why it doesn't work! Like jeff said, the code is in the database not the codebase, so it won't show up and I don't have to make a PR, I just had to suggest using vw so that the text size is dynamic. I have claimed this task I just need to figure out how to get a screen shot... Thanks !

And be aware -- this code is currently stored in the database, rather than in the codebase. So it's editable by site admins. But that means the solution for this will be probably stylesheets and a screenshot rather than a PR. The code driving this on the site is here:

https://codein.withgoogle.com/dashboard/task-instances/5245453814726656/

@jonxuxu
Copy link
Member

jonxuxu commented Dec 9, 2018

Oh I see! Where can you access the database, and how can you preview it?

@digitaldina
Copy link
Collaborator

@JonathanXu1 you can't access the database, but you can do this do preview it:
#4120 (comment)

@jonxuxu
Copy link
Member

jonxuxu commented Dec 9, 2018

I've made the carousel like in #4120 (comment), but there's no change in the frontend on the dashboard page. Am I looking in the wrong place?

Edit:
I see the image alts like you do:
image

@digitaldina
Copy link
Collaborator

@JonathanXu1 ya..:/

@jonxuxu
Copy link
Member

jonxuxu commented Dec 9, 2018

Perhaps there is a way of linking the source of the image, like how we do in github? Or have you tried linking a web url instead of a locally hosted source?

@digitaldina
Copy link
Collaborator

@JonathanXu1 ooo good idea I will try linking to a url

@digitaldina
Copy link
Collaborator

@JonathanXu1 Ya I've tried that, doesn't seem to work. Guess I'll have to wait and see if jeff can help out :)

@SidharthBansal

This comment has been minimized.

@oorjitchowdhary

This comment has been minimized.

@SidharthBansal

This comment has been minimized.

@grvsachdeva grvsachdeva added help wanted requires help by anyone willing to contribute fto-candidate issues which are meant to be solved by first timers but aren't well-formatted yet HTML CSS labels Jan 21, 2019
@Linda-Ikechukwu
Copy link

Hi, outreachy intern here. Is this issue still open? Can I be assigned to it?

@SidharthBansal
Copy link
Member

@Linda-Ikechukwu go ahead.

@shipcy
Copy link
Contributor

shipcy commented Jan 11, 2020

Is this issue still open? Can I take this?

@SidharthBansal
Copy link
Member

Please go ahead
thanks

@chirag-wadhwa
Copy link
Contributor

Can I take up this issue, if it's still open ?

@SidharthBansal
Copy link
Member

Sure

@stale stale bot added the stale label Oct 7, 2020
@jywarren
Copy link
Member

jywarren commented Oct 8, 2020

This is resolved now, thank you!

@jywarren jywarren closed this as completed Oct 8, 2020
@publiclab publiclab deleted a comment from stale bot Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CSS fto-candidate issues which are meant to be solved by first timers but aren't well-formatted yet good first issue help wanted requires help by anyone willing to contribute HTML stale
Projects
None yet
Development

No branches or pull requests

9 participants