Plugin de Layouts

Any idea why the layouts work perfectly fine in one subcategory:

but not in another?

1 curtida

It’s the tags and specifically this line:

You can either reduce the number of tags or try this:

.topic-list-item .discourse-tags {
   display:  unset;
}

That will cause them to wrap, hopefully.

(NB inline-block also works but unset works even better in this case)

2 curtidas

Thank you so much! That works.

1 curtida

Thanks for nice work.
but
When i tick: Enable right sidebar globally to yes or no there is no timeline on the topic. It is a bug or no ?? (im testing the material theme)

There will be another reason why you’re not seeing the timeline. Please try using the plugin by itself with other plugins and themes disabled.

My Sandbox has this plugin installed, has enable right sidebar globally turned off and you can still see topic timelines, e.g. https://discourse.angusmcleod.com.au/t/test-event-for-bug/898

Also make sure you haven’t included “topic” in the layouts sidebar right enabled setting.

2 curtidas

So much functionality has been provided (you people are great) that it has become rather tough to understand all the options which cross depend on each other (layout vs location plugins) for a power user (but not powerful tech) like me.

But I understand that I shouldn’t bite more than I can chew. But again, can’t help myself when see something new and useful.

1 curtida

I agree! I’m going to be updating the first post of this plugin topic, and my other plugin topics soon with a standardised template that makes it easier to understand the functionality and how to implement it on your site.

If you have any specific use cases in mind for this plugin let me know and I can help you out.

2 curtidas

EDIT:

Let’s not talk about why it’s fixed, or not…

Sorry :wink: :slight_smile: (Missed that option)

1 curtida

Eu também estava me perguntando sobre isso.

Você pode criar os Widgets que serão usados por Plugins de Layout em um componente de tema, ou os Widgets precisam ser criados também por um Plugin?

Provavelmente ambos funcionarão; criei-os em plugins.

A única vantagem de fazer o último é que você pode configurar programaticamente os locais dos widgets no plugin.rb sem precisar usar o Admin.

1 curtida

Sim, é possível!

Existe uma interface tanto no lado do servidor quanto no lado do cliente para adicionar widgets.

Importe esta função

import { addCustomWidget } from 'discourse/plugins/discourse-layouts/discourse/widgets/sidebar';

Em seguida, use-a assim em um inicializador

addCustomWidget({
  name: <nome do widget>,
  position: <lado onde você quer que ele apareça>,
  order: <ordem relativa a outros widgets no mesmo lado>
})

Certifique-se também de que ele esteja habilitado, seja em todo o site (nas configurações do site) ou para uma categoria específica (nas configurações da categoria).

Alguém sabe se o CSS para isso precisa ser alterado recentemente? Atualizei para a versão mais recente e o CSS não funciona mais. Ainda vejo o uso de .nav-container e .locations-map quando inspeciono os elementos no navegador.

Abraços.

Nada mudou no plugin, mas o CSS do Discourse pode ter mudado.

Este é o mapa da lista de tópicos, certo? Tente

#list-area .locations-map:not(.expanded) {
  ...
}

Obrigado, mas sem sorte. Joguei quase todos os elementos lá e não houve nenhuma mudança:

.list-area .widget-container .nav-container .leaflet-container .locations-map:not(.expanded) {
  height: 750px;
}

Resolvido: era necessário o comentário !important. Obrigado pela ajuda.

.nav-container .locations-map:not(.expanded) {
  height: 750px !important;
}
2 curtidas

Está funcionando bem no meu site em https://babyforex.net. Mas, se você usar a barra lateral direita na visualização de tópicos, não deve usar o DiscoTOC: DiscoTOC - automatic table of contents

1 curtida

Na página do tópico,

A navegação de postagens está oculta.

Acho que a navegação de postagens pode ser movida para a esquerda do site e a barra lateral para o lado direito.

Está me mostrando o erro - “Não existe nenhuma configuração chamada ‘layouts_sidebar_left_enabled’” e o mesmo ocorre com qualquer configuração que eu esteja tentando criar nela.

Você poderia detalhar melhor as etapas que está seguindo para obter esse erro? Por favor, forneça detalhes suficientes para que alguém possa reproduzi-lo.

Você está usando uma versão oficial atualizada do Discourse? Só damos suporte aos nossos plugins na branch tests-passed.