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

feat: redesigns sessions page and add lock/unlock column #2964

Merged
merged 3 commits into from
May 23, 2019

Conversation

shreyanshdwivedi
Copy link
Member

@shreyanshdwivedi shreyanshdwivedi commented May 19, 2019

Fixes #2958

Short description of what this resolves:

Redesigns the session page and introduce lock/unlock column

Changes proposed in this pull request:

- Takes out "short abstract" column
- Moves the actions icons below "Title" and increase the size
- Adds a column "Track"
- Adds a column "Type" e.g. to distinguish workshops and talks
- Adds column with an icon to lock/unlock a session 
- Hides edit option if session is locked

Screenshot_2019-05-20 Session Sessions Apk19 Events Open Event

If session is locked
Screenshot_2019-05-20 Session Sessions Order Events Open Event

Checklist

  • I have read the Contribution & Best practices Guide.
  • My branch is up-to-date with the Upstream development branch.
  • The acceptance, integration, unit tests and linter pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

uds5501
uds5501 previously approved these changes May 20, 2019
Copy link
Contributor

@uds5501 uds5501 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, push the corresponding server PR soon!

@shreyanshdwivedi
Copy link
Member Author

@uds5501 @CosmicCoder96 @pradeepgangwar @kushthedude please review
Link to server side PR - fossasia/open-event-server#5931

@fossasia fossasia deleted a comment May 20, 2019
kushthedude
kushthedude previously approved these changes May 20, 2019
Copy link
Member

@kushthedude kushthedude left a comment

Choose a reason for hiding this comment

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

Everything looks nice !

@@ -0,0 +1,14 @@
{{record.title}}<br>
Copy link
Contributor

Choose a reason for hiding this comment

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

We generally avoid the use of the br tag. You can use a hidden divider instead.
Also there's no point of using a property name if you are using record.title simply to get the title.
May be you can use (get record column.propertyName) for it.

Copy link
Member Author

@shreyanshdwivedi shreyanshdwivedi May 22, 2019

Choose a reason for hiding this comment

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

@ritikamotwani when I use <div class="hidden ui divider"></div> instead of <br> the separation becomes too large.
With hidden divider
Screenshot_2019-05-22 Session Sessions Apk19 Events Open Event(1)

With br tag
Screenshot_2019-05-22 Session Sessions Apk19 Events Open Event

Should I implement this or not?

Copy link
Contributor

Choose a reason for hiding this comment

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

@shreyanshdwivedi , use the hidden divider one.

@@ -0,0 +1,9 @@
{{#if record.isLocked}}
{{#ui-popup content=(t 'Unlock Session') class='ui icon button' click=(action unlockSession record) position='left center'}}
Copy link
Contributor

Choose a reason for hiding this comment

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

Make it a basic button like the other action buttons.

Copy link
Member Author

Choose a reason for hiding this comment

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

@ritikamotwani all the action buttons are also ui-popup as we need to show tooltip on hovering the buttons displaying the specific task which they carry out

Copy link
Contributor

@ritikamotwani ritikamotwani May 22, 2019

Choose a reason for hiding this comment

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

Yes, I know what a popup is. I am talking about the class of the button used. Make it ui basic :)

fixes codacy issues

updates buggy unlockSession condition and error message

hide edit option for locked sessions

fixes the class of lock icon and removes br tag
@shreyanshdwivedi
Copy link
Member Author

@ritikamotwani I've updated the PR. Please review

@fossasia fossasia deleted a comment May 22, 2019
@shreyanshdwivedi shreyanshdwivedi changed the title [WIP] feat: redesigns sessions page and add lock/unlock column feat: redesigns sessions page and add lock/unlock column May 22, 2019
@auto-label auto-label bot added the feature label May 22, 2019
@@ -72,6 +77,36 @@ export default Controller.extend({
viewSession(id) {
this.transitionToRoute('events.view.sessions.edit', id);
},
lockSession(session) {
session.set('isLocked', true);
this.set('isLoading', true);
Copy link
Contributor

Choose a reason for hiding this comment

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

Everything looks good, but just had a question, wouldn't it be nice if the session.set('isLocked', true) be executed when isLoading is true? (I think it's just code design, won't affect the functionality, of course)

Copy link
Member Author

@shreyanshdwivedi shreyanshdwivedi May 22, 2019

Choose a reason for hiding this comment

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

@uds5501 I did this intentionally. I had a number of references where values were set before setting isLoading to true. As we know that isLoading is basically for loading status if a task takes time so it is added just before the time-taking task. However, if you want you can refer to login-form or register-form where similar implementations were carried out.

Copy link
Contributor

Choose a reason for hiding this comment

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

Understood!

uds5501
uds5501 previously approved these changes May 22, 2019
kushthedude
kushthedude previously approved these changes May 22, 2019
Copy link
Member

@kushthedude kushthedude left a comment

Choose a reason for hiding this comment

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

LGTM!

@@ -0,0 +1,15 @@
{{record.title}}
Copy link
Contributor

Choose a reason for hiding this comment

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

Also there's no point of using a property name if you are using record.title simply to get the title.
May be you can use (get record column.propertyName) for it.

this.send('refreshRoute');
})
.catch(() => {
this.notify.error(this.get('l10n').t('An unexpected error has occurred.'));
Copy link
Contributor

Choose a reason for hiding this comment

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

Use this.notify....this.l10n

@shreyanshdwivedi shreyanshdwivedi dismissed stale reviews from kushthedude and uds5501 via 95ec7de May 23, 2019 02:54
@fossasia fossasia deleted a comment May 23, 2019
@shreyanshdwivedi
Copy link
Member Author

@CosmicCoder96 @pradeepgangwar please review

@abhinavk96 abhinavk96 merged commit 21ecfc0 into fossasia:development May 23, 2019
@shreyanshdwivedi shreyanshdwivedi deleted the sessionPage branch August 20, 2019 15:08
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.

Redesign Sessions Page and Add Lock/Unlock Column
5 participants