plots2 icon indicating copy to clipboard operation
plots2 copied to clipboard

Break out login items into new template partial

Open jywarren opened this issue 8 years ago • 28 comments

This has been marked as a good candidate for becoming a first-timers-only issue like these, meaning that it's simple, self-contained, and with some extra formatting, could be a great entry point for a new contributor. If you're familiar enough with this code, please consider reformatting or reposting it as a first-timers-only issue, and then ping @publiclab/reviewers to get it labelled. Or, if this is not your first time, try to solve it yourself!


This section of the navbar contains the login pane:

https://github.com/publiclab/plots2/blob/b6e1647b929082bc54bbfa63fe4317d4ae3cf2c3/app/views/layouts/_header.html.erb#L124-L166

It looks like this:

screenshot 2018-10-24 at 11 49 05 am

Let's break it out into a partial template, called _login.html.erb and include it back into that spot in _header.html.erb with code like this:

<%= render :partial => "layouts/social_icons" %>

jywarren avatar Oct 24 '18 15:10 jywarren

hey @jywarren , are we trying to make different login page and then rendering that page from _header.html.erb

codeIriss avatar Oct 24 '18 19:10 codeIriss

can u please explain this to me @jywarren ?

codeIriss avatar Oct 24 '18 19:10 codeIriss

Ah, no, sorry - we want it to look the same, but for the template to be separated out so that each template file is not too long. The header template would still include in the login template via the "render partial" call. Make sense?

On Wed, Oct 24, 2018 at 3:05 PM Aditya Kumar [email protected] wrote:

can u please explain this to me @jywarren https://github.com/jywarren ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/3755#issuecomment-432788984, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJ8HgAV5fAGMSm9G4iroMiw2q2wPPks5uoLn3gaJpZM4X4QgV .

jywarren avatar Oct 24 '18 20:10 jywarren

so we want to separate only th part which have login with @jywarren am i right?

codeIriss avatar Oct 24 '18 20:10 codeIriss

we are just trying to separate the social icons part?? @jywarren

codeIriss avatar Oct 24 '18 20:10 codeIriss

yes, that's right.

On Wed, Oct 24, 2018 at 4:16 PM Aditya Kumar [email protected] wrote:

so we want to separate only th part which have login with @jywarren https://github.com/jywarren am i right?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/3755#issuecomment-432811946, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJ94i7ojGExTbbcYxAn4nNcOh5xeOks5uoMp5gaJpZM4X4QgV .

jywarren avatar Oct 24 '18 20:10 jywarren

actually the whole login pane, as shown in the screenshot. So it'll include the login form plus the social icons above it.

On Wed, Oct 24, 2018 at 4:17 PM Aditya Kumar [email protected] wrote:

we are just trying to separate the social icons part?? @jywarren https://github.com/jywarren

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/3755#issuecomment-432812222, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJxynmIHpdzomLJqb3IMbOSDc_mYEks5uoMqrgaJpZM4X4QgV .

jywarren avatar Oct 24 '18 20:10 jywarren

okay we are trying to get the whole login part from login.html.erb to header.html.erb? @jywarren

codeIriss avatar Oct 24 '18 20:10 codeIriss

we will just have the <%= render :partial => "layouts/social_icons" %> in header.html.erb part right? @jywarren

codeIriss avatar Oct 24 '18 20:10 codeIriss

we're trying to remove the HTML code for the login form and icons from _header.html.erb, into a new _login.html.erb, and then include it back in with the render partial line. Make sense?

On Wed, Oct 24, 2018 at 4:20 PM Aditya Kumar [email protected] wrote:

okay we are trying to get the whole login part from login.html.erb to header.html.erb? @jywarren https://github.com/jywarren

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/3755#issuecomment-432813178, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJ34J0BHqGGh3d20DBjTBoZ-8wxgNks5uoMtVgaJpZM4X4QgV .

jywarren avatar Oct 24 '18 20:10 jywarren

its clear now @jywarren can i work on this issue?

codeIriss avatar Oct 24 '18 20:10 codeIriss

I'm sorry, <%= render :partial => "layouts/social_icons" %> is just an example, i apologize it's confusing. Using that format, you can modify it as:

<%= render :partial => "layouts/login" %>

which would go where you remove the login HTML form from. Then the new file you create at _login.html.erb` would get inserted there automatically.

jywarren avatar Oct 24 '18 20:10 jywarren

Yes please! If you open a PR we can help you solve it.

jywarren avatar Oct 24 '18 20:10 jywarren

i will try it and will show you @jywarren

codeIriss avatar Oct 24 '18 20:10 codeIriss

@jywarren Can I take this up? Or is @codeIriss still doing it? Also, I can't find this issue on the GCI platform

oorjitchowdhary avatar Nov 23 '18 08:11 oorjitchowdhary

Sorry for being late with the issue solving , actually I was busy with my exams and I will try to solve the issue as soon as possible.

On Fri 23 Nov, 2018, 2:10 PM Oorjit Chowdhary <[email protected] wrote:

@jywarren https://github.com/jywarren Can I take this up? Or is @codeIriss https://github.com/codeIriss still doing it? Also, I can't find this issue on the GCI platform

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/3755#issuecomment-441180880, or mute the thread https://github.com/notifications/unsubscribe-auth/Ah0hPMuZs9XgsQsCFjuk6rJMQRXNbug9ks5ux7SMgaJpZM4X4QgV .

codeIriss avatar Nov 23 '18 08:11 codeIriss

@jywarren is this a GCI issue then?

oorjitchowdhary avatar Nov 23 '18 08:11 oorjitchowdhary

Perhaps we give @codeIriss https://github.com/codeIriss a little more time? Thank you!!!

On Fri, Nov 23, 2018 at 3:48 AM Oorjit Chowdhary [email protected] wrote:

@jywarren https://github.com/jywarren is this a GCI issue then?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/3755#issuecomment-441182234, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJ3alRpW9yj9doiTXIk5kWajBbrviks5ux7ZMgaJpZM4X4QgV .

jywarren avatar Nov 26 '18 22:11 jywarren

@jywarren, @codeIriss opened a PR #3768 but it hasn't solved the issue.. So can I solve it by opening a new PR... Also, I think we should keep this issue in sync with #2866 .. As in we could first solve #2866 and then put that template here and remove this one..

oorjitchowdhary avatar Dec 02 '18 17:12 oorjitchowdhary

@publiclab/mentors

oorjitchowdhary avatar Dec 04 '18 10:12 oorjitchowdhary