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

refactor: Contacts menu to Vue #40749

Merged
merged 1 commit into from
Oct 16, 2023
Merged

Conversation

ChristophWurst
Copy link
Member

@ChristophWurst ChristophWurst commented Oct 2, 2023

Summary

The contacts menu is still based on jQuery, Backbone and handlebars.

Changes

  • The top action is inline, the rest is moved into an actions menu
  • Small styling changes due to move to standardized Vue components

Screenshots

Before After
Bildschirmfoto vom 2023-10-03 15-10-16 Bildschirmfoto vom 2023-10-03 15-17-43

TODO

  • Migrate by moving code around
  • Fix search
  • Migrate code to BEM
  • Replace icon classes with material icons not possible because icon URIs are provided via public API

Checklist

@ChristophWurst ChristophWurst self-assigned this Oct 2, 2023
@ChristophWurst ChristophWurst marked this pull request as ready for review October 3, 2023 13:19
@ChristophWurst
Copy link
Member Author

Requesting early feedback. I'll try to organize the styles into BEM. Otherwise this should be mergeable.

Copy link
Member

@skjnldsv skjnldsv left a comment

Choose a reason for hiding this comment

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

Amazing!! 👑

Some rules to consider though:

  • Classes are a bit messy, sometimes it looks like BEM, sometimes it doesn't. Let's be compliant ad follow BEM entirely? But maybe you just reused the old css classes and wanted to keep changes to a minimum, I don't know)
  • icon-loading should be replaced with Vue NcLoadingIcon component
  • emptycontent class style should be replaced with NcEmptyContent component
  • Variables should have strict typing if possible (like this.loadingText)
  • Maybe reset the error when searching again? (See this.error)
  • contactsAppEnabled is always true
  • searchTerm should reset on close maybe? Not sure :)

@ChristophWurst
Copy link
Member Author

Classes are a bit messy, sometimes it looks like BEM, sometimes it doesn't. Let's be compliant ad follow BEM entirely? But maybe you just reused the old css classes and wanted to keep changes to a minimum, I don't know)

See PR description

@ChristophWurst
Copy link
Member Author

searchTerm should reset on close maybe? Not sure :)

I did not reset before and unified search doesn't do that either. I'm keeping the search term.

@ChristophWurst
Copy link
Member Author

@skjnldsv I can add Vue component unit tests as a replacement for the removed js specs. Would you be okay with that? I'd install and use https://www.npmjs.com/package/@vue/test-utils on top of jest.

@skjnldsv
Copy link
Member

skjnldsv commented Oct 4, 2023

@ChristophWurst absolutely!
You can also do cypress component testing if you prefer, we have multiple options now :)

@ChristophWurst ChristophWurst added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Oct 4, 2023
@ChristophWurst
Copy link
Member Author

image

Moved a few more pixels to get close to the old appearance. This is as good as it gets with my frontend skills.

@ChristophWurst
Copy link
Member Author

Branch updated to latest master and removed two accidentally added files.

@skjnldsv please double-check if I fulfilled your requested changes.

@ChristophWurst
Copy link
Member Author

@skjnldsv @Pytal friendly ping. I need this to start #40559.

Copy link
Member

@skjnldsv skjnldsv left a comment

Choose a reason for hiding this comment

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

Only complain I have is the vertical centering of the avatar, but all good otherwise! 🚀
image

EDIT: ah, and the roundness of this icon:
image

Copy link
Member

@Pytal Pytal left a comment

Choose a reason for hiding this comment

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

🙌

@Pytal
Copy link
Member

Pytal commented Oct 11, 2023

Failing CI related

@ChristophWurst
Copy link
Member Author

@skjnldsv did you compile the sources? 🤭

Because those two bugs are fixed with the rework:

Avatar Icon
Bildschirmfoto vom 2023-10-11 16-31-00 Bildschirmfoto vom 2023-10-11 16-31-08

@skjnldsv
Copy link
Member

@skjnldsv did you compile the sources? 🤭

Because those two bugs are fixed with the rework:

I think I did, but maybe I did it wrong 🙈

@ChristophWurst
Copy link
Member Author

ChristophWurst commented Oct 11, 2023

Pushed a rebased, squashed and compiled version.

edit: I can reproduce the <a> styling now!
edit2: fixed

@skjnldsv skjnldsv added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Oct 12, 2023
@szaimen
Copy link
Contributor

szaimen commented Oct 12, 2023

CI failure related afaics

@szaimen szaimen added 2. developing Work in progress and removed 4. to release Ready to be released and/or waiting for tests to finish labels Oct 12, 2023
@ChristophWurst

This comment was marked as outdated.

@szaimen
Copy link
Contributor

szaimen commented Oct 16, 2023

@ChristophWurst how much work is still to be done here? Asking because of #40873

@ChristophWurst
Copy link
Member Author

UsersSettingsContext::iCreateUserWithPassword() doesn't work anymore. There is an open modal afterwards, the user is not created. Acceptance tests that create a second user fail.

@ChristophWurst
Copy link
Member Author

/compile amend /

Signed-off-by: Christoph Wurst <[email protected]>
Signed-off-by: nextcloud-command <[email protected]>
@ChristophWurst
Copy link
Member Author

Drone is about to pass. Cypress fails but I don't see the relation. Let's get this in.

@ChristophWurst ChristophWurst added 4. to release Ready to be released and/or waiting for tests to finish and removed 2. developing Work in progress labels Oct 16, 2023
@ChristophWurst ChristophWurst merged commit b914916 into master Oct 16, 2023
38 of 40 checks passed
@ChristophWurst ChristophWurst deleted the refactor/contacts-menu-to-vue branch October 16, 2023 16:12
@szaimen
Copy link
Contributor

szaimen commented Oct 16, 2023

🎉🎉🎉🎉🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish technical debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Contacts menu popover overflow is not visible Vue contacts menu
4 participants