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

CSS for Mobile Responsiveness - Coding Competitions Page #61

Closed
NayakPenguin opened this issue Dec 30, 2022 · 17 comments
Closed

CSS for Mobile Responsiveness - Coding Competitions Page #61

NayakPenguin opened this issue Dec 30, 2022 · 17 comments
Assignees
Labels
beginner-friendly Tasks which can be implemented by a beginner. CSS Design Issues good first issue Good for newcomers

Comments

@NayakPenguin
Copy link
Member

The problem we are trying to address is the poor mobile responsiveness of the table on https://algolisted.com/coding-competitions. The table appears as intended when viewed on a laptop or display with a width of 1100 pixels or more. However, when the display width is smaller, the table becomes distorted and difficult to use. Our goal is to improve the appearance and usability of the table for users on mobile devices.

Laptop screenshot:
Screenshot 2022-12-30 at 1 22 29 PM

Phone Screenshot :
Screenshot 2022-12-30 at 1 23 14 PM

Design I want on mobile responsiveness : Sorry for the bad drawing, coz I don't know how to use figma :)
WhatsApp Image 2022-12-30 at 1 18 18 PM

@NayakPenguin NayakPenguin added good first issue Good for newcomers beginner-friendly Tasks which can be implemented by a beginner. CSS Design Issues labels Dec 30, 2022
@NayakPenguin NayakPenguin changed the title Coding Competitions Page - Mobile Responsiveness CSS for Mobile Responsiveness - Coding Competitions Page Dec 30, 2022
@JordanAdair
Copy link
Contributor

Feel free to assign me to this!

So you want the table to turn into individual cards?

How many cards do you want to fit in the screen?

Is there any specific interactivity you need? i.e. What happens when someone clicks the card?

@NayakPenguin
Copy link
Member Author

Thank you for your interest, @JordanAdair. I will send you a clearer drawing in a few minutes to help you better understand the concept. I will also answer these questions.

@NayakPenguin
Copy link
Member Author

cc-image

  • So you want the table to turn into individual cards? Yes, it is exactly like that.
  • How many cards do you want to fit on the screen? All the cards can be seen, the data is actually less than 20 so it would not be an issue.
  • Is there any specific interactivity you need? i.e. What happens when someone clicks the card? The competition name is clickable and is blue in color, and when you click you get directly to the respective link.

@JordanAdair
Copy link
Contributor

JordanAdair commented Dec 30, 2022

Should we have the card itself re-direct the user instead of a link? Sometimes it's difficult for some people to click links on mobile devices, especially if the cards are on the smaller side.

@NayakPenguin
Copy link
Member Author

I agree that your recommendation is a good one. Let's move forward with it. Additionally, feel free to make small decisions on your own to improve the page.

@JordanAdair
Copy link
Contributor

Sounds good. I'll start working on this later tonight.

@JordanAdair
Copy link
Contributor

When I try to access the "Coding Competitions" tab I get an infinitely loading screen alongside these error messages:

fb5a2c656e99526fa53e150d2914173b

I tried it on a few different branches and IDEs but I still get the same result.

Looks like a CORS issue.

According to Google, to fix this error, you can try the following steps:

  1. Check if the server is configured to allow CORS requests: Make sure that the server at the URL https://script.google.com/macros/s/AKfycbzXyVH1o6CzzJUfLN0qC-EscTKQeKouAUlU3oBs_S85WvB13wPHuawZLK43QJrqBua3Ng/exec is configured to allow cross-origin requests. If the server is not configured to allow CORS requests, you will need to contact the server administrator and ask them to enable CORS.

  2. Use a CORS proxy: If the server is not configured to allow CORS requests, you can try using a CORS proxy to make the request. A CORS proxy is a server that acts as an intermediary between your client and the server, adding the necessary CORS headers to the response.

  3. Use the no-cors mode: If you are making a request using the fetch() function, you can try using the no-cors mode by setting the mode option to 'no-cors'. This will prevent the browser from blocking the request, but it will also prevent you from reading the response from the server.

@NayakPenguin
Copy link
Member Author

Is this in localhost? Does this https://algolisted.com/coding-competitions open on your system? This is the first time any of the users encountered this issue, this might be a potential issue.
If the issue persists after restarting the localhost, I might have to consider adding the "no-cors" option to the fetch function to troubleshoot the problem.

@NayakPenguin
Copy link
Member Author

If the issue persists, you can try testing the responsiveness using a dummy data set. On my end, I can then use the real API to fetch the data.

Screenshot 2022-12-31 at 10 53 56 AM

@JordanAdair
Copy link
Contributor

It might be an interaction with my Privacy Badger and/or uBlock Origin plugins. I'm in bed right now so I'll have to check tomorrow.

Is this in localhost? Does this https://algolisted.com/coding-competitions open on your system? This is the first time any of the users encountered this issue, this might be a potential issue.

The issue happens on both local-host and the live website. Same CORS error.

@NayakPenguin
Copy link
Member Author

Ok no issues, do it tomorrow :)
Yes, I think it might be a Privacy Badger and/or uBlock Origin plugins thing, still, I will ask my friends to check it just to ensure that the code is fine.
So, you can try using the dummy data when you work on it.

@JordanAdair
Copy link
Contributor

Okay I disabled Privacy Badger and it fixed the issue.
We might want to look into addressing this, though. Privacy Badger is an extremely commonly used extension.

JordanAdair added a commit to JordanAdair/Algorithmist that referenced this issue Jan 1, 2023
Created Mobile Cards in the format suggested, although I feel like we could make these look a little better somehow. Would love to hear any suggestions.

Also, I can't figure out how to specifically target the content above the cards (filter, text, etc.) on mobile. I wanted to keep it in line with the cards, but I can't figure out how to "target" those with CSS.
NayakPenguin added a commit to JordanAdair/Algorithmist that referenced this issue Jan 1, 2023
NayakPenguin added a commit that referenced this issue Jan 1, 2023
@JordanAdair
Copy link
Contributor

Please let me know if there is anything else you want me to do for this issue.

@NayakPenguin
Copy link
Member Author

There is a challenging task that may require some thought to complete - it is the coding sheets that you were previously working on. It should be an exciting task for you.

If you visit the https://algolisted.com/coding-sheets/two-pointers-lc page, you will see that we have tags on each. One of these tags is the main tag - (they have a slightly darker border). I want all the questions to be listed under this main tag.

Screenshot 2023-01-03 at 3 17 12 AM

The main tag can be something like "Day 1" or "2 Sum problem similar," as seen above, etc.

Check the example given below. Of course, the UI would be similar to ours and we would have the main tag on the top left. All "Day 1" / main-tags questions would have a single tag on the top left.

Screenshot 2023-01-03 at 3 22 40 AM

This is just for the desktop version.

I hope that I have clearly conveyed the task.

@JordanAdair
Copy link
Contributor

I'm a bit confused. Is this a new issue, or does this have to do with the Competitions page? Is this desired mobile-specific behaviour or are we doing a re-design in general?

@NayakPenguin
Copy link
Member Author

This issue pertains to the design on desktop mode for the coding sheets page and is not connected to the Competitions page.

Here is a picture that may provide further insight.
Screenshot 2023-01-03 at 5 39 09 PM

I will create a new issue, on the main issues page for this as well :)

@JordanAdair
Copy link
Contributor

Alright, is there anything else that needs to be done for this issue or can we close it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beginner-friendly Tasks which can be implemented by a beginner. CSS Design Issues good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants