¿Cómo mostrar el mapa del tema en publicaciones sin comentarios?

Hey, for metric report purposes, I’m trying to see if there’s a setting or CSS implementation to show the topic-map for all posts (even posts that don’t have comments)?


Above is a screenshot of a post not showing any topic-map

Imgur
Above is an imgur showing the topic-map once it has at least one comment

Any insight is appreciated! Thanks!

2 Me gusta

I haven’t tried these out, so I may be mistaken, but there are a few ‘summary’ options in the Admin/Other settings that may tweak what you need:

/admin/site_settings/category/uncategorized?filter=Summary

Sorry, I think I had a brainfart and conflated a couple of different things. :slightly_smiling_face:

2 Me gusta

I had somebody check out the Admin Settings for me and they said they couldn’t find it. I don’t have access :cry:

There are a few workarounds in this topic (variations of ‘add a post’):

2 Me gusta

There’s not a setting for this, it requires the topic to have at least one reply. Is there a specific reason you want it to show?

3 Me gusta

I was thinking about that as a last option type of thing. Don’t really want to add a filler comment/post for the sake of keeping things streamlined.

1 me gusta

Hey, @awesomerobot
Yes. I am performing weekly metric reports on posts/publications to begin analyzing traffic and engagement with certain topics/teams.

but more specifically, the view count is what you’re after? everything else would show 0:

We’ve had a couple requests for this, so maybe we should work out a mini-topic-map that shows the views in the case where there’s only a single post…

6 Me gusta

Yes, just the view count. That would help keep the high-priority metrics consistent between all posts.
It would be super awesome if you and your team takes some time to work on something. I’m sure a number of people would appreciate it =)

Hola, me preguntaba si ahora es posible ver la vista de tema para publicaciones sin comentarios.

1 me gusta

Hola y bienvenida @Salome_renaud :slight_smile:

Puedes verlos en la lista principal de temas, pero me temo que todavía no es posible obtener un mapa de temas para temas sin respuestas.

Solo un recordatorio de que esto no es posible en dispositivos móviles, por lo que en realidad no hay forma (que yo sepa) de ver el recuento de vistas del tema en dispositivos móviles si el tema no tiene respuesta.

2 Me gusta

Hola,

Ahora que vi este tema, recordé que había visto un commit sobre esto antes. :slightly_smiling_face:

Creo que esto debería funcionar ahora :arrow_down_small:

Encabezado

<script type="text/discourse-plugin" version="0.8">
  api.includePostAttributes('topicMap');
</script>


También he añadido un poco de CSS para ocultar estadísticas innecesarias cuando no hay otras publicaciones.

Común / CSS

body:not(.archetype-private_message) {
  .topic-post.regular {
    // if last-of-type is the #post_1
    &:last-of-type {
      article#post_1 {
        .topic-map {
          width: max-content;
          nav.buttons {
            display: none;
          }
          ul li {
            // hide all statistics but views
            &:not(.secondary.views) {
              display: none;
            }
          }
          // show views on mobile view
          .secondary.views {
            .mobile-view & {
              display: list-item;
              text-align: center;
            }
          }
        }
      }
    }
  }
}

Escritorio (sin respuesta)

Móvil (sin respuesta)

Cuando alguien responde, vuelve al valor predeterminado.

14 Me gusta

Pero si eso es todo lo que necesitas, ya está en la Lista de Temas, ¿por qué necesitas siquiera entrar en la vista de Temas para esta métrica?
Incluso puedes aprovechar la lista superior para ordenar la Lista de Temas por número de vistas dentro de un período determinado…

4 Me gusta

Cuando tema no se muestra en la lista de temas, ¿cómo podemos ver las vistas de un tema que no tiene respuestas y es un poco antiguo?

Puedes filtrar la lista de temas por una categoría y/o una etiqueta. Como hay menos temas, es más fácil encontrar el que buscas. Ejemplo para tu tema.

Con las nuevas opciones de filtro de Experimental topics list filter feature puedes filtrar la lista de temas aún más. Por ejemplo, puedes filtrar temas con una sola publicación.
Últimos temas con un máximo de 1 publicación

3 Me gusta

@Moin
Muchas gracias por sugerirme esta ruta de ‘filtro’. Gracias.

Por cierto, ¿cuál es la diferencia si busco/filtro: “posts-max:-1” y sin el signo menos: “posts-max:1”?

1 me gusta

Muchas gracias @Don

Proporcionaste una solución muy simple, eficiente y conveniente. Funciona exactamente como se deseaba.

@Don Estoy usando este código como un componente, y quizás funcionaba antes, pero dejó de funcionar repentinamente cuando lo eliminé de mi tema actual y predeterminado, y luego volví a agregar el mismo (no cambié ningún carácter en el código).

Código/Componente:

No se muestra, incluso después de Ctrl+F5 en el navegador, puedes verlo aquí:

Ahora existe una configuración show_topic_map_in_topics_without_replies que puedes usar

2 Me gusta