[DEV] [OFFICIAL] CODENAME: Chameleon

For style authors to post and receive feedback on 3.3.x styles still in development. Any development styles you wish to use on your live board should be installed with caution!
User avatar
Hanakin
Front-End Dev Team Lead
Front-End Dev Team Lead
Posts: 937
Joined: Wed Dec 30, 2009 8:14 am
Name: Michael Miday
Contact:

Re: [DEV] [OFFICIAL] CODENAME: Chameleon

Post by Hanakin »

It is standardish pagination and the overly is at the bottom of the page. Similar to how it’s done on the blizzard forums. This is just the current idea nothing is set in stone. Also this is a design library and not a theme so just swap it out for the one you want.

Andreas_B
Registered User
Posts: 28
Joined: Sun Sep 08, 2019 10:02 am

Re: [DEV] [OFFICIAL] CODENAME: Chameleon

Post by Andreas_B »

Hi,

a threaded style wouldn't be bad.

Means, when commenting, not a whole new site is being loaded with your reply on top, and you have to scroll down to see the latest comments; but you can simply scroll up to read the last comments, while the comment you write is at the bottom of the page [under last comment] and gives you all the functions you need to customize the font, upload pictures, etc. [like forexfactory.com has it].

Thanks...

User avatar
Gumboots
Registered User
Posts: 215
Joined: Fri Oct 11, 2019 1:59 am

Re: [DEV] [OFFICIAL] CODENAME: Chameleon

Post by Gumboots »

Threaded is a love it or hate it sort of thing. Personally, if a site is using threaded I find another site.

User avatar
Hanakin
Front-End Dev Team Lead
Front-End Dev Team Lead
Posts: 937
Joined: Wed Dec 30, 2009 8:14 am
Name: Michael Miday
Contact:

Re: [DEV] [OFFICIAL] CODENAME: Chameleon

Post by Hanakin »

same its not something that is possible anyway with phpbb. That is a core change not a style change.

User avatar
warmweer
Registered User
Posts: 3589
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium

Re: [DEV] [OFFICIAL] CODENAME: Chameleon

Post by warmweer »

Andreas_B wrote:
Fri Nov 29, 2019 10:08 am
a threaded style wouldn't be bad.
Developing a style which would show a threaded page in a flat style shouldn't be a much of problem.
The other way: showing flat board data in a threaded way is senseless for phpBB since there is no id stored for the parent post.
The current quote system (with a link to the originating post) could be used to output a threaded view but that only works for posts made since 3.2 and isn't fool proof at all (post_ids can be edited, and post_content can be edited + quotes without origin data are also allowed).
We should embrace problems, without which there wouldn't be any solutions.

User avatar
Hanakin
Front-End Dev Team Lead
Front-End Dev Team Lead
Posts: 937
Joined: Wed Dec 30, 2009 8:14 am
Name: Michael Miday
Contact:

Re: [DEV] [OFFICIAL] CODENAME: Chameleon

Post by Hanakin »

we are getting a bit offtopic here a bit with the thread stuff...Its not going to happen and not related to the current development

User avatar
Tastenplayer
Registered User
Posts: 449
Joined: Thu Jul 03, 2014 9:20 pm
Location: Switzerland
Name: Jutta Koliofotis
Contact:

Re: [DEV] [OFFICIAL] CODENAME: Chameleon

Post by Tastenplayer »

Mick wrote:
Mon Jul 29, 2019 10:00 am
mrgtb wrote:
Fri Jun 14, 2019 8:36 pm
more users are coming on mobile devices, than there is coming on desktop PCs
And that’s a crying shame, nobody wants to compute any more, they just want to swipe.
That's not exactly true. It depends on the type of forum and especially on the age of the registered users. Most of them come to my forum with desktop computers.
My phpBB Style Board & More
Be the best version of yourself rather than a bad copy of someone else!
Excuse me for my English, but I learned the language by speaking to people and not at school.

User avatar
Hanakin
Front-End Dev Team Lead
Front-End Dev Team Lead
Posts: 937
Joined: Wed Dec 30, 2009 8:14 am
Name: Michael Miday
Contact:

Re: [DEV] [OFFICIAL] CODENAME: Chameleon

Post by Hanakin »

Quick update. Codepen has completely nerfed their app by restricting cross site requests in a weird and idiotic way. This completely breaks alot of the functionality we were relying on to test and work with the components on the site. This means that several of the components we have on there may not display perfectly.

With that said please disregard any loading issues when you check out the new reworked emoji panel (you may have to refresh the browser a few times for it to load correctly. Also due to limits on requests it is not displaying all the flag emojis.)

https://codepen.io/hanakin/pen/ErBPLL?editors=1100
Screenshot 2019-12-11 10.18.07.png
Let me know what you think...Next step is to integrate it with the editor...As always its very early on in the dev process and things are subject to change once we are further along in the dev process. This is just a mock-up of the component.

User avatar
mrgoldy
Jr. Extension Validator
Posts: 1269
Joined: Tue Oct 06, 2009 7:34 pm
Location: The Netherlands
Name: Gijs
Contact:

Re: [DEV] [OFFICIAL] CODENAME: Chameleon

Post by mrgoldy »

I personally would go for a different icon than the alien for the custom emoji. Rest looks truly amazing!

Anyways, I have thought about this a bit and thought I would share my thoughts.

While twig advertises macros as the 'php feature of templating', they're a pain to work with.
The biggest issue is that they are local and not global, meaning you'll have to import them at the top of each template file if you want them, using {% from 'components/dropdown.twig' import dropdown as dropdown %} and then for every component.
The second issue would be is that macro's do not have access to global template variables, unless you pass the _context variable to each and every macro. And then you still have to access then from there, instead of the regular way: {{ _context.MY_VARIABLE }} instead of {{ MY_VARIABLE }}.
An other issue is that macro's are not accessible from the back-end, the php side of things. If there isn't a need for it already somewhere through out the code, it will probably arise in the future and nevertheless it isn't a good idea to limit the possibilities.

Therefore I would suggest using the {{ include() }} function, which has a lot more possibilities.
That way components will be globally available, have access to the global template variables (the _context) and they are accessible from the back-end. Also, you can pass specific variables to it like you would to a macro, using the additional variables parameters.

Code: Select all

{{ include('component/dropdown.twig', {
	myVariable: 'test1',
	otherVar: userrow.USER_ID,
}) }}
I would suggest using camelCase variables, to make sure they do not overlap / interfere with php template assign variables, which all are uppercase.
You can then even document per component what variables can/should be set per component.

It's even possible to create a component function for you, which is a wrapper shortcut, that will automatically prefix 'component/' and append '.twig'. So you would just have to do {{ component('dropdown') }}.

That's for the macro 'issue'.

And before you start writing massive amounts of code, I would suggest thinking over what functions, filters, comparisons and tags. Here are a few things I personally would add:

Tags / Nodes
  • {% switch 'something' %}
  • {% case 'something' %}
  • {% break %}
Comparisons
  • {% if variable is string %}
  • {% if variable is array %}
  • {% if variable is int %}
Functions
  • lang()
    I would vote for automatically uppercasing the string, so you do not have to that in the template and all language variables are uppercase anyway. ({{ lang('MY_LANG' ~ var|upper ~ '_DESC') }})
  • clean_id('string')
    Prepares a string for usage inside an id="" attribute. Making sure it's compatible with the norms.
Filters
  • |clean_id
    See above
  • |true('mode')
    where 'mode' is either 'first' or 'all', see below
  • |true_first
    Returns the first true value from an array, so you can easily find the first required class for example.
  • |true_all
    Returns all the true values from an array, so you can easily implode all applicable classes for example.
  • |implode_attr
    Implodes an associative array to be used as attributes, key="value" key2="value2" for example.
  • |wrap('element', 'classes')
    Where the 'element' is an HTML element, eg 'h3'. And you can optionally add classes:
    MY_STRING|wrap('h3', 'topic-title') -> <h3 class="topic-title">MY_STRING</h3>
    {{ ERROR ? ERROR|wrap('p', 'error') }} -> <p class="error">{{ ERROR }}</p>
Just my couple of pennies.

User avatar
spaceace
Registered User
Posts: 1866
Joined: Wed Jan 30, 2008 8:50 pm
Contact:

Re: [DEV] [OFFICIAL] CODENAME: Chameleon

Post by spaceace »

Hanakin wrote:
Fri Nov 29, 2019 1:42 am
Currently plan on having an always displayed nav overlay
i really hope this can be easily changed as i have never liked that on any site

Post Reply

Return to “[3.3.x] Styles in Development”