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

Admin Styles: RTL #100

Closed
etodanik opened this issue Mar 3, 2014 · 16 comments
Closed

Admin Styles: RTL #100

etodanik opened this issue Mar 3, 2014 · 16 comments

Comments

@etodanik
Copy link
Contributor

etodanik commented Mar 3, 2014

Hey, I would like to start actively pursuing this.

Some things I think are vital:

  • Ability to switch between RTL/LTR in the same site painlessly depending on the i18n setting.
  • Ease of maintainability

The most logical approach, it seems to me, is:

  • Put an rtl class on <html>, and then do something like this in the LESS:
body{
    direction: ltr;
   .rtl &{
      direction: rtl;
   }
}

.myElement{
    margin: 10px 0 5px 15px; 
    color: blue;
    padding: 25px;

   .rtl &{
       margin: 10px 15px 5px 0; /* the difference in RTL */
    }
}

Any thoughts?

@etodanik
Copy link
Contributor Author

etodanik commented Mar 3, 2014

An alternative approach is to adopt something like this:
https://github.com/DevelopmentIL/direction.less
If we go with this approach I'd advocate for renaming any left/right reference to before/after - to make things more abstract and confusing. (before means right in RTL and left in LTR)

One more approach is a middleware that automatically generates RTL styling like so:
https://www.npmjs.org/package/rtltr-for-less

I favor those two less because they would force certain workflows on the site developer who uses Apostrophe 2. A more "manualish" approach will keep the burden of developing for RTL or lack thereof completely within the decision making power of the developer.

@boutell
Copy link
Member

boutell commented Mar 3, 2014

@stuartromanek @kylestetz @livhaas @colpanik how do you folks feel about
Danny's suggested approach to accommodating right-to-left languages?

Both options seem potentially reasonable to me:

  • An "rtl" class on the html or body element, and all the LESS that cares
    about this distinction has &.rtl rules.
  • Using the direction.less tool that Danny refers to, which introduces LESS
    macros to be called instead of using margin-left, etc. directly. It
    automatically flips things if rtl is in effect.

Pragmatically speaking, the impact on us is diminished if we use the first
method, because Danny can just add .rtl rules as needed in pull requests
and we do what we usually do. The LESS files wind up a bit more cluttered.

On Mon, Mar 3, 2014 at 8:47 AM, Danny Povolotski
[email protected]:

An alternative approach is to adopt something like this:
https://github.com/DevelopmentIL/direction.less

One more approach is a middleware that automatically generates RTL styling
like so:
https://www.npmjs.org/package/rtltr-for-less

Reply to this email directly or view it on GitHubhttps://github.com//issues/100#issuecomment-36510934
.

Tom Boutell
Lead Developer
P'unk Avenue
215 755 1330
punkave.com
window.punkave.com

@etodanik
Copy link
Contributor Author

Any conclusion? I kind of favour the first method as well. Adding .rtl rules would make it easier to integrate and break less things.

@boutell
Copy link
Member

boutell commented Mar 15, 2014

I think an rtl class on the body is the best way to go. We'll accept pull
requests for that.

On Sat, Mar 15, 2014 at 11:17 AM, Danny Povolotski <[email protected]

wrote:

Any conclusion? I kind of favour the first method as well. Adding .rtl
rules would make it easier to integrate and break less things.

Reply to this email directly or view it on GitHubhttps://github.com//issues/100#issuecomment-37728311
.

Tom Boutell
Lead Developer
P'unk Avenue
215 755 1330
punkave.com
window.punkave.com

@etodanik
Copy link
Contributor Author

Great. I'll start working in that direction and submit a pull request when ready.

@kylestetz
Copy link
Contributor

@israelidanny just a note, we're working through some new designs for admin screens that will change the markup and styles to some extent. You'll start seeing them on the master branch soon. We'll do our best to make sure that any pull requests you submit will be brought over if we change any styles drastically. Thanks for bearing with us on this one!

In terms of our spring schedule, we're trying to finish up some new features and designs in the editor within the next two months. We will keep you in the loop.

@etodanik
Copy link
Contributor Author

To make some of my contribution easier while not slowing you Down - what
about you guys having a new design branch that would be always latest and
greatest?

If there is stuff you're not sure about for master , that is .

On Saturday, March 15, 2014, Kyle Stetz [email protected] wrote:

@israelidanny https://github.com/israelidanny just a note, we're
working through some new designs for admin screens that will change the
markup and styles to some extent. You'll start seeing them on the master
branch soon. We'll do our best to make sure that any pull requests you
submit will be brought over if we change any styles drastically. Thanks for
bearing with us on this one!

In terms of our spring schedule, we're trying to finish up some new
features and designs in the editor within the next two months. We will keep
you in the loop.


Reply to this email directly or view it on GitHubhttps://github.com//issues/100#issuecomment-37729515
.

@boutell
Copy link
Member

boutell commented Mar 15, 2014

We prefer to have our as-yet-unlaunched and recently launched projects
actually running the current master, because it's the best way for a small
shop to make sure the master really works and has enough eyes on it.

I can see how we might need a branch if we had plans that would be more
extensively disruptive though - if it was really necessary to push broken
code for a while.

I think we are slowing down in terms of outright bc breaks, though. The
recent schema changes were a bigger deal for most developers than the i18n
change.

On Sat, Mar 15, 2014 at 3:43 PM, Danny Povolotski
[email protected]:

To make some of my contribution easier while not slowing you Down - what
about you guys having a new design branch that would be always latest and
greatest?

If there is stuff you're not sure about for master , that is .

On Saturday, March 15, 2014, Kyle Stetz [email protected] wrote:

@israelidanny https://github.com/israelidanny just a note, we're
working through some new designs for admin screens that will change the
markup and styles to some extent. You'll start seeing them on the master
branch soon. We'll do our best to make sure that any pull requests you
submit will be brought over if we change any styles drastically. Thanks
for
bearing with us on this one!

In terms of our spring schedule, we're trying to finish up some new
features and designs in the editor within the next two months. We will
keep
you in the loop.

Reply to this email directly or view it on GitHub<
https://github.com/punkave/apostrophe/issues/100#issuecomment-37729515>
.

Reply to this email directly or view it on GitHubhttps://github.com//issues/100#issuecomment-37735888
.

Tom Boutell
Lead Developer
P'unk Avenue
215 755 1330
punkave.com
window.punkave.com

@etodanik
Copy link
Contributor Author

Wonderful! As long as what's cooking in master isn't behind what you guys
are doing so community developers could follow along

On Saturday, March 15, 2014, Tom Boutell [email protected] wrote:

We prefer to have our as-yet-unlaunched and recently launched projects
actually running the current master, because it's the best way for a small
shop to make sure the master really works and has enough eyes on it.

I can see how we might need a branch if we had plans that would be more
extensively disruptive though - if it was really necessary to push broken
code for a while.

I think we are slowing down in terms of outright bc breaks, though. The
recent schema changes were a bigger deal for most developers than the i18n
change.

On Sat, Mar 15, 2014 at 3:43 PM, Danny Povolotski
<[email protected]javascript:_e(%7B%7D,'cvml','[email protected]');

wrote:

To make some of my contribution easier while not slowing you Down - what
about you guys having a new design branch that would be always latest and
greatest?

If there is stuff you're not sure about for master , that is .

On Saturday, March 15, 2014, Kyle Stetz <[email protected]javascript:_e(%7B%7D,'cvml','[email protected]');>
wrote:

@israelidanny https://github.com/israelidanny just a note, we're
working through some new designs for admin screens that will change the
markup and styles to some extent. You'll start seeing them on the
master
branch soon. We'll do our best to make sure that any pull requests you
submit will be brought over if we change any styles drastically. Thanks
for
bearing with us on this one!

In terms of our spring schedule, we're trying to finish up some new
features and designs in the editor within the next two months. We will
keep
you in the loop.

Reply to this email directly or view it on GitHub<
https://github.com/punkave/apostrophe/issues/100#issuecomment-37729515>
.

Reply to this email directly or view it on GitHub<
https://github.com/punkave/apostrophe/issues/100#issuecomment-37735888>
.

Tom Boutell
Lead Developer
P'unk Avenue
215 755 1330
punkave.com
window.punkave.com


Reply to this email directly or view it on GitHubhttps://github.com//issues/100#issuecomment-37736100
.

@boutell
Copy link
Member

boutell commented Mar 15, 2014

There is nothing more bleeding edge than master right now (:

On Sat, Mar 15, 2014 at 4:11 PM, Danny Povolotski
[email protected]:

Wonderful! As long as what's cooking in master isn't behind what you guys
are doing so community developers could follow along

On Saturday, March 15, 2014, Tom Boutell [email protected]
wrote:

We prefer to have our as-yet-unlaunched and recently launched projects
actually running the current master, because it's the best way for a
small
shop to make sure the master really works and has enough eyes on it.

I can see how we might need a branch if we had plans that would be more
extensively disruptive though - if it was really necessary to push
broken
code for a while.

I think we are slowing down in terms of outright bc breaks, though. The
recent schema changes were a bigger deal for most developers than the
i18n
change.

On Sat, Mar 15, 2014 at 3:43 PM, Danny Povolotski
<[email protected]<javascript:_e(%7B%7D,'cvml','
[email protected]');>

wrote:

To make some of my contribution easier while not slowing you Down -
what
about you guys having a new design branch that would be always latest
and
greatest?

If there is stuff you're not sure about for master , that is .

On Saturday, March 15, 2014, Kyle Stetz <[email protected]
javascript:_e(%7B%7D,'cvml','[email protected]');>
wrote:

@israelidanny https://github.com/israelidanny just a note, we're
working through some new designs for admin screens that will change
the
markup and styles to some extent. You'll start seeing them on the
master
branch soon. We'll do our best to make sure that any pull requests
you
submit will be brought over if we change any styles drastically.
Thanks
for
bearing with us on this one!

In terms of our spring schedule, we're trying to finish up some new
features and designs in the editor within the next two months. We
will
keep
you in the loop.

Reply to this email directly or view it on GitHub<
https://github.com/punkave/apostrophe/issues/100#issuecomment-37729515>

.

Reply to this email directly or view it on GitHub<
https://github.com/punkave/apostrophe/issues/100#issuecomment-37735888>
.

Tom Boutell
Lead Developer
P'unk Avenue
215 755 1330
punkave.com
window.punkave.com

Reply to this email directly or view it on GitHub<
https://github.com/punkave/apostrophe/issues/100#issuecomment-37736100>
.

Reply to this email directly or view it on GitHubhttps://github.com//issues/100#issuecomment-37736608
.

Tom Boutell
Lead Developer
P'unk Avenue
215 755 1330
punkave.com
window.punkave.com

@etodanik
Copy link
Contributor Author

etodanik commented Apr 4, 2014

@kylestetz - I saw some changes shipped to npm. Is there more to come shortly?

@kylestetz
Copy link
Contributor

@israelidanny we've got some changes coming to the admin modal interfaces in the next week or two. We're working out a new tabbed modal for editing snippets, along with a way to specify tab groupings for fields in the schema. We'll send another message in the google group once that is published.

@benirose
Copy link
Contributor

Hi all,

We will not be adding any admin sweeping admin style changes for a while now. @israelidanny did you ever make any changes you'd like to submit in a pull request? Otherwise I will put this ticket in the backlog, as we are talking about integrating more i18n support in some backend refactoring we're currently doing.

@boutell
Copy link
Member

boutell commented Feb 20, 2015

Yes, on the backend we imposed sanity: self.render always requires req and
is for routes, while self.partial does not take req and is only for nested
use inside a nunjucks helper function. This way I'm able to consistently
make "__" available.

On Fri, Feb 20, 2015 at 4:41 PM, benirose [email protected] wrote:

Hi all,

We will not be adding any admin sweeping admin style changes for a while
now. @israelidanny https://github.com/israelidanny did you ever make
any changes you'd like to submit in a pull request? Otherwise I will put
this ticket in the backlog, as we are talking about integrating more i18n
support in some backend refactoring we're currently doing.


Reply to this email directly or view it on GitHub
#100 (comment).

*THOMAS BOUTELL, *DEV & OPS
P'UNK AVENUE | (215) 755-1330 | punkave.com

@stuartromanek
Copy link
Member

Where are we at on RTL in the admin interface here? Is the official answer to add your own classes and styles? Does this recommendation need a home in the docs? Maybe a HOWTO on the current state of i18n would be a better issue for us?

@boutell
Copy link
Member

boutell commented Sep 25, 2017

There is a separate issue for modern (2.x) Apostrophe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants