StackOverFlow--Clone icon indicating copy to clipboard operation
StackOverFlow--Clone copied to clipboard

Search is NOT shown when runs it locally.

Open JeffreyZZ opened this issue 2 years ago • 9 comments

image

Here is the header displayed while I ran this project on my local machine, as you can see that the search bar is missing and the header is NOT well lay out. Could you please help take a look?

JeffreyZZ avatar Oct 01 '22 05:10 JeffreyZZ

Hello @JeffreyZZ , I have seen this and...

Long story short... The CSS I used in header is stack over flow's production CSS inserted like <link rel="stylesheet" href="xyz.stackoverflow"> and When they changed or updated their style then my stack over flow clone project styling also broke, Because they might have changed CSS class's names or styling. That's why you're seeing this broken style, But I have to stick to a separate non-production CSS so it won't break in future, and I will fix this as soon as possible.

Thanks for pointing out. Any other issues ?

Yawan-1 avatar Oct 02 '22 03:10 Yawan-1

Hello @Yawan-1 Have you seen into the use of non-production CSS for this project?

svanberg90 avatar Jan 27 '23 06:01 svanberg90

Hi @svanberg90 , I didn't understand what you are trying to ask. Can you explain in brief ?

Yawan-1 avatar Jan 27 '23 07:01 Yawan-1

Hi @Yawan-1 If you look at the original post from JeffreyZZ where he ask why the layout you get when you run the project via manage.py runserver looks odd. You mention in the post below that it has to do with stack over flow's production CSS. Is there some way to fix this with a non-production CSS? You mentioned that you would look into such a solution

svanberg90 avatar Jan 27 '23 11:01 svanberg90

Yes, @svanberg90 There is a fix for this problem by sticking with a specific version of the CSS or by using Stackoverflow's Stacks it allow users to use site's design and components (like icons, themes, colors, model popups, etc.).

In short, There are two ways to fix this -

  1. We store stackoverflow's current CSS and serve from the django site itself (or from aws). In this option, we won't have to link stackoverflow's updating CSS but saved CSS will be used in production and It won't break whenever stackoverflow releases a new version of their CSS or whenever change their design.

  2. Second option is use to stacks, But It will take time, because We will have to replace and rename every class and every for loop component.

Note: Method 1 will use stackoverflow's production CSS which stackoverflow doesn't allow easily. They don't allow users to copy their production CSS

Yawan-1 avatar Jan 27 '23 13:01 Yawan-1

So maybe the way to go is to develop a new design, that dont use Stack css?

svanberg90 avatar Jan 28 '23 06:01 svanberg90

Yes and No, but why not to use Stack's CSS because it will take so much time to redesign class names and ids. And We will have to design a completly different layout which also take so much time to change the whole design.

Redesign the whole site < Use stacks . (on Time Basis).

I'd love to hear your opinions on this.

Yawan-1 avatar Jan 28 '23 11:01 Yawan-1

I see. I think the best solution would be to store stackoverflow's current CSS and serve from the django site. How difficult will it be to obtain the current css? And calibrate the page against the new css?

svanberg90 avatar Jan 28 '23 12:01 svanberg90

Sorry for late reply @svanberg90 , Yeah It is also good option. It won't be any difficult because mainly Header's CSS is the only style that is badly broken, so the main focus is to fix Header first.

And One more thing... Stackoverflow may also complain about using their production CSS (again). But We are good as long as we do not use it in live production website.

Yawan-1 avatar Feb 01 '23 16:02 Yawan-1