www.jsdelivr.com icon indicating copy to clipboard operation
www.jsdelivr.com copied to clipboard

Redesign

Open xbpcb opened this issue 4 years ago • 83 comments

Redesign jsDelivr

xbpcb avatar Jul 16 '21 11:07 xbpcb

Your Render PR Server URL is https://www-jsdelivr-com-pr-400.onrender.com.

Follow its progress at https://dashboard.render.com/web/srv-c3omq3s6fj33so8vcgr0.

render[bot] avatar Jul 16 '21 11:07 render[bot]

Please pull in the latest commits from master to fix the PR preview.

MartinKolarik avatar Jul 16 '21 11:07 MartinKolarik

Note here about wording. We are mixing up "GB" and "bandwidth" in the design. In all places where we refer to "requests" and "GB", it should be "requests" and "bandwidth" and the unit should be part of the value. E.g. this switch but it's in many places so use search for "GB" and fix everywhere:

image

MartinKolarik avatar Apr 09 '22 18:04 MartinKolarik

moved below

MartinKolarik avatar May 05 '22 21:05 MartinKolarik

History page:

Done:

  • [x] some icons are blurred, please try to find svg version for all logs, where not available, make sure to use the correct 1x and 2x sizes for png - e.g., the rawgit icon has just one size and it's also wrong,
  • [x] update the content based on this comment: https://github.com/jsdelivr/www.jsdelivr.com/issues/408#issuecomment-916949064

MartinKolarik avatar May 05 '22 21:05 MartinKolarik

moved below

MartinKolarik avatar May 06 '22 15:05 MartinKolarik

Purge page:

  • [ ] the API accepts paths, not full URLs, you need to parse the path from the input and send only that

Regarding urls in purge page, I need more details. For example, is it acceptable that I write the below url into input box? https://cdn.jsdelivr.net/abc And here, what can be the exact path to send the request to api? Is it filtered path like this? https://cdn.jsdelivr.net/ I want to confirm if this is correct or not.

@MartinKolarik

IvanAdamovic646 avatar May 09 '22 10:05 IvanAdamovic646

@IvanAdamovic646 user types https://cdn.jsdelivr.net/abc you send /abc, user types http://cdn.jsdelivr.net/def you send /def

any other domain/protocol => error

MartinKolarik avatar May 09 '22 11:05 MartinKolarik

I have filtered path from url and updated.

IvanAdamovic646 avatar May 10 '22 12:05 IvanAdamovic646

Package page: https://www-jsdelivr-com-pr-400.onrender.com/package/npm/react

  • [x] undefined chart labels on Statistics tab - be sure to test all period options including yearly

image

  • [x] if a package doesn't have a readme, show the "Show/Configure Files" tab on load (https://www-jsdelivr-com-pr-400.onrender.com/package/npm/yandex-metrica-watch)
  • [ ] chart labels on Y axis - number should be aligned to the right and have space between every three digits (see design), use _.formatNumber
  • [ ] "Group by" - this needs to be implemented on the client. Show only the groups for which we have all the data, drop the first/last group with partial data. Example: today is May 13, I select yearly range and group by month. Data for May won't be shown because the month isn't complete yet, the chart will have (from right to left) April, March, ..., until June 2021 (again May 2021 won't be shown because the API response will only have data for dates 13. 05. 2021 - 31. 05. 2021).
  • [x] Ignore "day" period for charts - if a user selects "day", don't update the charts, keep whatever was shown before, update only the tables (see how it works at https://www.jsdelivr.com/package/npm/react)
  • [x] Vulnerabilities badge needs to be a link (see at master branch)
  • [ ] the version text should not change color on open - still wrong when you open it and hover something in the dropdown image
  • [x] code/icon overlap image

MartinKolarik avatar May 11 '22 23:05 MartinKolarik

Footer:

  • [x] looks broken on 800px width, we should either try to fit the desktop version to that size or show the mobile version up to 992
  • [x] newsletter form does nothing. Open https://jsdelivr.us11.list-manage.com/subscribe?u=0c85fe2c9a60310df9a3d6751&id=283887f736 in a new tab and pre-fill the field with what the user wrote in footer

MartinKolarik avatar May 12 '22 00:05 MartinKolarik

I updated my to-do comments above with some new tasks.

MartinKolarik avatar May 12 '22 00:05 MartinKolarik

Repost of my previous comments because GitHub now hides them

Purge page:

  • [x] on mobile version (width 600), the results box looks broken: image

done:

  • [x] only allow URLs on https://cdn.jsdelivr.net domain (accept http too)
  • [x] the API accepts paths, not full URLs, you need to parse the path from the input and send only that
  • [x] the expanded view doesn't match design image
  • [x] not sure why the whole row is clickable and changes border color on click but expands only when clicked on the "success" text: image

probably expand on click anywhere and don't change border, make sure the cursor indicates the area is clickable

  • [x] the footer must stick to the bottom of the screen (this applies to all pages where the content is too short)

image

see https://www.jsdelivr.com/tools/purge, in CSS it was previously implemented by the wrapper/push elements

image

MartinKolarik avatar May 15 '22 20:05 MartinKolarik

Homepage:

  • [x] the buttons should be aligned by type (i.e. npm always in forth column) image
  • [x] no "load more" here, always show the full version (this was updated in the design too) image

Done:

  • [x] keywords https://www-jsdelivr-com-pr-400.onrender.com/?query=bootstrap-vue - show full text, not "..." but only first 15 keywords, allow it to be multiline, make sure it doesn't overflow (see https://www.jsdelivr.com/?query=bootstrap-vue)

  • [x] package description in search results should be full-width (12 columns, not 8)

  • [x] on load, if there is a search query, and on pagination change, it must scroll to the top of the search results like here, not top of the page

MartinKolarik avatar May 15 '22 20:05 MartinKolarik

Please also check this on all pages: https://github.com/jsdelivr/www.jsdelivr.com/pull/400#issuecomment-1094100977

MartinKolarik avatar May 16 '22 22:05 MartinKolarik

probably wrong color of mobile me u on tap: Screenshot_20220517-021116.jpg

MartinKolarik avatar May 17 '22 00:05 MartinKolarik

image

Total button count is 5 , isn't it? So you mean npm button should always be in fourth column . Is it ok to have a gap between first button and npm button? #

itstarlight0808 avatar May 17 '22 05:05 itstarlight0808

@itstarlight0808 yes, fixed position for each button type, empty space when it's missing.

MartinKolarik avatar May 17 '22 06:05 MartinKolarik

@MartinKolarik How are you? On stats page, how to get necessary data using API.

  1. Global data 1.1 Requests Served - how to get it? 1.2 Bandwidth - how to get it? Let me know full detailed api url and example. Thanks.

itstarlight0808 avatar May 19 '22 14:05 itstarlight0808

@itstarlight0808 it'll use data from 2.1, updated doc and mocks here: api mocks.zip

MartinKolarik avatar May 19 '22 21:05 MartinKolarik

I already got it , but can't notice its usage. Full API url is like this? https://data.jsdelivr.com/v1/stats/network/providers?type=hits&period=month

But it doesn't work. :( image How to get Requests served and Bandwidth data using API? Please give me a hint. Thanks.

itstarlight0808 avatar May 19 '22 23:05 itstarlight0808

@itstarlight0808 that's exactly how the URL will be but it isn't live yet, that's why you have sample data files there. You can create all functions as needed (including the URL construction logic) but instead of making real http calls just return data from that zip (copy paste the data into the JS as needed and when the API is live we'll just remove it and make real http calls).

MartinKolarik avatar May 20 '22 00:05 MartinKolarik

So for those two tables, render data from API-data-2.1-network-providers.json for now. Note that the ZIP I uploaded here is an updated version - newer than what you got before.

MartinKolarik avatar May 20 '22 00:05 MartinKolarik

I see. Thanks for your guide.

itstarlight0808 avatar May 20 '22 01:05 itstarlight0808

I'll be posting the rest of the issues in #438 - in some cases the fixes were not correct or broke something so be sure to recheck everything that isn't marked as done there.

MartinKolarik avatar May 25 '22 12:05 MartinKolarik

Hello. @MartinKolarik How are you? I have questions regarding 2.1 requests served over time chart. Currently, it's using hitsData: { rank: 3, typeRank: 2, total: 6222085912, versions: { '0.0.1': { total: 18, dates: { '2022-03-26': 0, '2022-03-27': 0, '2022-03-28': 0, '2022-03-29': 9, ... Instead of this, should I have to use API-data-2.1-network-providers.json data to draw chart? Thanks.

itstarlight0808 avatar May 26 '22 10:05 itstarlight0808

@itstarlight0808 yes the data right now is completely wrong, replace it with the file I sent.

MartinKolarik avatar May 26 '22 11:05 MartinKolarik

@MartinKolarik OK. I got it.

itstarlight0808 avatar May 26 '22 11:05 itstarlight0808

@MartinKolarik 2.1 Requests served over time /stats/network/providers?type={ hits | bandwidth }&country=CA&period=month 2.2 Requests served by country /stats/network/countries?type={ hits | bandwidth}&period=month

I need to confirm these request url. Did I properly write these request urls?

itstarlight0808 avatar May 26 '22 11:05 itstarlight0808

yes

MartinKolarik avatar May 26 '22 12:05 MartinKolarik