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

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)

@fossasia fossasia deleted a comment from codacy-bot May 19, 2019

@fossasia fossasia deleted a comment from codacy-bot May 19, 2019

@fossasia fossasia deleted a comment from codacy-bot May 19, 2019

@fossasia fossasia deleted a comment from codacy-bot May 19, 2019

@fossasia fossasia deleted a comment from codacy-bot May 19, 2019

@fossasia fossasia deleted a comment from codacy-bot May 19, 2019

@fossasia fossasia deleted a comment from codacy-bot May 19, 2019

@shreyanshdwivedi shreyanshdwivedi force-pushed the shreyanshdwivedi:sessionPage branch from ad01219 to dedc981 May 19, 2019

@fossasia fossasia deleted a comment from codacy-bot May 19, 2019

@uds5501
Copy link
Contributor

left a comment

Looks good, push the corresponding server PR soon!

@shreyanshdwivedi

This comment has been minimized.

Copy link
Member Author

commented May 20, 2019

@fossasia fossasia deleted a comment from codacy-bot May 20, 2019

@kushthedude
Copy link
Contributor

left a comment

Everything looks nice !

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

This comment has been minimized.

Copy link
@ritikamotwani

ritikamotwani May 22, 2019

Contributor

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.

This comment has been minimized.

Copy link
@shreyanshdwivedi

shreyanshdwivedi May 22, 2019

Author Member

@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?

This comment has been minimized.

Copy link
@ritikamotwani

ritikamotwani May 22, 2019

Contributor

@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'}}

This comment has been minimized.

Copy link
@ritikamotwani

ritikamotwani May 22, 2019

Contributor

Make it a basic button like the other action buttons.

This comment has been minimized.

Copy link
@shreyanshdwivedi

shreyanshdwivedi May 22, 2019

Author Member

@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

This comment has been minimized.

Copy link
@ritikamotwani

ritikamotwani May 22, 2019

Contributor

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

@shreyanshdwivedi shreyanshdwivedi force-pushed the shreyanshdwivedi:sessionPage branch 2 times, most recently from e9b4320 to 92e41a6 May 22, 2019

redesigns sessions page and add lock/unlock column
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 shreyanshdwivedi force-pushed the shreyanshdwivedi:sessionPage branch from 92e41a6 to 2fc76a2 May 22, 2019

@shreyanshdwivedi

This comment has been minimized.

Copy link
Member Author

commented May 22, 2019

@ritikamotwani I've updated the PR. Please review

@fossasia fossasia deleted a comment from codacy-bot 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);

This comment has been minimized.

Copy link
@uds5501

uds5501 May 22, 2019

Contributor

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)

This comment has been minimized.

Copy link
@shreyanshdwivedi

shreyanshdwivedi May 22, 2019

Author Member

@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.

This comment has been minimized.

Copy link
@uds5501

uds5501 May 22, 2019

Contributor

Understood!

@kushthedude
Copy link
Contributor

left a comment

LGTM!

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

This comment has been minimized.

Copy link
@ritikamotwani

ritikamotwani May 23, 2019

Contributor

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.'));

This comment has been minimized.

Copy link
@ritikamotwani

ritikamotwani May 23, 2019

Contributor

Use this.notify....this.l10n

@shreyanshdwivedi shreyanshdwivedi dismissed stale reviews from kushthedude and uds5501 via 95ec7de May 23, 2019

@codacy-bot

This comment has been minimized.

Copy link

commented May 23, 2019

Codacy Here is an overview of what got changed by this pull request:

Clones added
============
- app/controllers/events/view/sessions/list.js  2
         

See the complete overview on Codacy

@fossasia fossasia deleted a comment from codacy-bot May 23, 2019

@shreyanshdwivedi

This comment has been minimized.

Copy link
Member Author

commented May 23, 2019

@CosmicCoder96 CosmicCoder96 merged commit 21ecfc0 into fossasia:development May 23, 2019

1 check was pending

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
6 participants
You can’t perform that action at this time.