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

New tabbed edit package UI #410

Merged
merged 9 commits into from
Mar 4, 2019
Merged

Conversation

WebFreak001
Copy link
Member

@WebFreak001 WebFreak001 commented Feb 16, 2019

This makes it easier to extend the package configuration and add more settings without cluttering the UI

Tip for reviewing: disable whitespace in diff options

using tabs (if JS is enabled)

Screenshots:

Desktop view

package view general tab
package view categories tab
package view repository tab
package view advanced tab


Mobile view

mobile top view of general
mobile bottom view of general


no-JS view (kind of like before, but with buttons at the top to jump around)

no-JS dub package view


also package view looks slighly different now to better highlight which tab is selected:
package documentation tab now slightly further down

@dlang-bot
Copy link
Collaborator

Thanks for your pull request, @WebFreak001!

@wilzbach wilzbach temporarily deployed to dub-registry-staging-pr-410 February 16, 2019 14:19 Inactive
@wilzbach
Copy link
Member

A bit unrelated, but maybe we should hide warnings >= 5 with e.g. <details>?
I experimented with DCD as test package and got this:

image

@WebFreak001
Copy link
Member Author

WebFreak001 commented Feb 16, 2019

imo there should be a way to dismiss warnings because there is no way to fix them anyway for an already released version

br
| #[strong= stats.monthly.to!string] downloads this month
br
| #[strong= stats.total.to!string] downloads total
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this could be a separate tab "statistics"?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I quite like having the statistics directly when you open the package instead.

Maybe a more dedicated border and some more stats would make this better.


var links = subtabs.querySelectorAll("a.tab");

if (openpage)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

openpage vs. hasPage below -> be consistent in naming.

hasPage = true;
if (!hasPage)
return;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move into separate function

public/scripts/pkgadmin.js Outdated Show resolved Hide resolved
public/scripts/pkgadmin.js Show resolved Hide resolved
upgradeSubtabs(subtabs[i], openpage);
}

upgradeAllSubtabs("");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Be consistent. The call below uses no arguments.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

passing empty string initializes with default page, passing with no args will put in the current hash

@wilzbach
Copy link
Member

wilzbach commented Feb 16, 2019

Looking at it this is a very nice improvement 👍, but I think we should try to make the "General" tab a bit prettier. It looks very unstructured at the moment:

image

Also, now that we have tabs I guess we could add "Badges" as another one and show sth. similar to

image

Maybe in a style similar to:

image

But I will open a separate issue for this. (-> #411)

@wilzbach wilzbach temporarily deployed to dub-registry-staging-pr-410 February 16, 2019 14:59 Inactive
@wilzbach wilzbach temporarily deployed to dub-registry-staging-pr-410 February 16, 2019 15:35 Inactive
@WebFreak001
Copy link
Member Author

I did slight modifications making the general page look a bit better
new general page

@wilzbach
Copy link
Member

Have you tried moving the logo to the right side and inserting a border in-between?

@wilzbach
Copy link
Member

Alternatively if this still looks weird, maybe the logo can always be a separate tab (as its not too often updated)?

@WebFreak001
Copy link
Member Author

I think it's wasted space moving that into a separate tab (and like this it directly shows you an image of what you are editing), so I would definitely keep it in the general tab.

I will add a small separator line

@wilzbach wilzbach temporarily deployed to dub-registry-staging-pr-410 February 16, 2019 16:41 Inactive
@wilzbach wilzbach temporarily deployed to dub-registry-staging-pr-410 February 16, 2019 17:46 Inactive
@WebFreak001
Copy link
Member Author

anything else for this PR? It's fairly trivial to add new tabs (just a button and a new div with anchor like the others) so anything additional could also be added later. I think as for how this is right now, this is a fairly well working solution.

@wilzbach wilzbach temporarily deployed to dub-registry-staging-pr-410 February 19, 2019 20:21 Inactive
Copy link
Member

@wilzbach wilzbach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, but I didn't had time to dive into all CSS changes, so I would be happy if someone else could have a look at this too. @thewilsonator maybe?

@wilzbach
Copy link
Member

(preview can be done with "View deployment" and the user dummyUser with test1234 - this user is created freshly for each preview)

@thewilsonator
Copy link
Contributor

@thewilsonator maybe?

I'm really not good with web stuff, @ZombineDev?

@wilzbach
Copy link
Member

Ping. Could anyone spare a second pairs of eyes here?
Maybe create a thread in the NG?

@PetarKirov
Copy link
Member

I was not able to login with those credentials.

@wilzbach
Copy link
Member

Ah. The registry seems to auto-lowercase the username on save, but not when checking for the login. Try dummyuser or [email protected]

@wilzbach wilzbach merged commit ec09c4d into dlang:master Mar 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants