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

[IMPROVE] UI design for Tables and tabs component on Directory #11026

Merged
merged 30 commits into from
Jun 19, 2018

Conversation

karlprieb
Copy link
Contributor

@karlprieb karlprieb commented Jun 6, 2018

A better design for tables and tab component, applied on Directory page.

Still needs to write a documentation about these new components and how the directory feature works. We can make a blogpost. What you @RocketChat/core think?

2018-06-07 15 47 41

@karlprieb karlprieb added the ui/ux label Jun 6, 2018
@karlprieb karlprieb added this to the 0.66.0 milestone Jun 6, 2018
@karlprieb karlprieb requested review from ggazzo and gdelavald June 6, 2018 22:34
@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-11026 June 6, 2018 22:35 Inactive
@gdelavald
Copy link
Contributor

gdelavald commented Jun 7, 2018

There is this weird delay when toggling between users and channels, could this be a performance issue?

Also, you can't order channels based on user quantity, and even though the cursor shows as pointer there is no mouse event on clicking the rows, which can be misleading.

@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-11026 June 7, 2018 18:02 Inactive
@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-11026 June 7, 2018 18:47 Inactive
@karlprieb karlprieb changed the title [WIP] [FIX] Table and tabs component for Directory [FIX] Table and tabs component for Directory Jun 7, 2018
@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-11026 June 7, 2018 18:49 Inactive
@graywolf336
Copy link
Contributor

Why is the name of this pull request labeled as [FIX] when the description says:

New table and tab component applied on Directory page.

@ggazzo
Copy link
Member

ggazzo commented Jun 8, 2018

@graywolf336 ... the design is new, but we didnt change nothing as feature, just fixed the bad UI, or am I wrong?

@ggazzo ggazzo changed the title [FIX] Table and tabs component for Directory [FIX] UI design for Tables and tabs component on Directory Jun 8, 2018
@geekgonecrazy
Copy link
Contributor

Should we instead use an improve tag? Instead of fix or new.

@vynmera
Copy link
Contributor

vynmera commented Jun 9, 2018

@geekgonecrazy Good call, an IMPROVE tag would make the most sense here.

Furthermore, by using a tag like that, we might get more people to polish up the existing parts of RC, something quite important to good UX and code :-)

@ggazzo
Copy link
Member

ggazzo commented Jun 9, 2018

I agree @geekgonecrazy , but I thought we had just NEW, BREAK, FIX

@vynmera
Copy link
Contributor

vynmera commented Jun 9, 2018

@ggazzo that's the issue, I think~

@geekgonecrazy
Copy link
Contributor

geekgonecrazy commented Jun 9, 2018

@ggazzo right we only have the 3. I'm suggesting we consider one more. That way things such as component redesign can be surfaced separately so we can make it more clear the components we improve vs the ones we fix a bug only.

Like some times we completely rework something for the purpose of improving a lot of things and it does close bugs, but over all we improved functionality.

Just an idea. @rodrigok what do you think? That or should we add a tag to PR's that it's design, that way they can be found that way? Could also surface based on that in changelog?

Copy link
Member

@ggazzo ggazzo left a comment

Choose a reason for hiding this comment

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

  • Mobile view
  • Scroll or pagination
  • Different Icons on each table rooms/users
  • loading state
  • debounce the search when typing

As we can only search by name I think in small screens (mobile) we should hide the another fields.

My suggestion:

image

mobile now:

image

}

.tab {
margin: 0 1rem;
Copy link
Member

Choose a reason for hiding this comment

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

I think you should use transition: color .3s; here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

Template.table.events({
'click tbody tr'() {
const onItemClick = Template.instance().data.onItemClick;
if (onItemClick) {
Copy link
Member

Choose a reason for hiding this comment

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

return onItemClick && onItemClick(this)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍


Template.tabs.events({
'click .tab'(e) {
$('.tab').removeClass('active');
Copy link
Member

Choose a reason for hiding this comment

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

I think this way will not work for nested tabs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

how nested tabs should work? We will have nested tabs? We already have a design for that?

Copy link
Member

@ggazzo ggazzo Jun 12, 2018

Choose a reason for hiding this comment

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

we dont have design to nested to show you now, but just to think...
, and we can have more than one per page... you are looking for ALL .tabs and maybe you are creating a bug
image
you did here, why not keep inside the component?

Template.tabs.onRendered(function() {
	this.$('.tab').first().addClass('active');
	this.data.tabs.onChange(this.data.tabs.tabs[0].value);
});

and more we are using a reactive framework, please change that using reactive vars.

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we do a simple {activeClass} variable on the helper and change according to state?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I created a 'ReactiveVar' to keep the state of the active tab and adde a helper to check which tab is active and add an active class to this tab.

Thank you for your suggestions :)

};
},
onTableItemClick() {
const searchType = Template.instance().searchType;
Copy link
Member

Choose a reason for hiding this comment

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

const { searchType } = Template.instance();

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

@ggazzo ggazzo changed the title [FIX] UI design for Tables and tabs component on Directory [IMPROVE] UI design for Tables and tabs component on Directory Jun 12, 2018
@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-11026 June 14, 2018 20:08 Inactive
@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-11026 June 14, 2018 20:38 Inactive
@karlprieb
Copy link
Contributor Author

@kaiiiiiiiii Thank you for your report :)

I already fixed the first problem.
For the second and third problems we will need some help from our design team, so I won't be able to fix that today.

@ggazzo ☝️

@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-11026 June 15, 2018 17:49 Inactive
@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-11026 June 17, 2018 23:59 Inactive
@karlprieb
Copy link
Contributor Author

Hey @kaiiiiiiiii we will remove channel description from this table layout for now. In a near future we will add a extended (with descriptions) and compact layout for this table, just like we did with the sidebar.

Thank again for your reports :)

@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-11026 June 18, 2018 00:00 Inactive
@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-11026 June 19, 2018 17:40 Inactive
@ggazzo ggazzo temporarily deployed to rocket-chat-pr-11026 June 19, 2018 18:43 Inactive
Copy link
Contributor

@gdelavald gdelavald left a comment

Choose a reason for hiding this comment

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

Lgtm

@ggazzo ggazzo merged commit 9a93ccb into develop Jun 19, 2018
@ggazzo ggazzo deleted the table-component branch June 19, 2018 21:11
@rodrigok rodrigok mentioned this pull request Jun 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants