Making WordPress.org

Opened 5 years ago

Closed 5 years ago

#4835 closed enhancement (fixed)

Support Forums: Condense code blocks by default

Reported by: clorith's profile Clorith Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: Priority: normal
Component: Support Forums Keywords: has-patch
Cc:

Description

Code blocks are set to a fixed size, leading to a need to scroll to see the full content, this helps keep pages short so you don't get overwhelmed, but when actually looking through code or debug data, it can be a hindrance.

The DevHub already has this solved by allowing you to expand/collapse the code, on.only showing a few lines by default.

Relateed #2107, #815

Attachments (1)

4835.diff (4.6 KB) - added by valentinbora 5 years ago.
New plugin wporg-bbp-code-blocks adding code expand/contract functionality

Download all attachments as: .zip

Change History (12)

#1 @valentinbora
5 years ago

This seems to have been done in #959 via [1429]

@valentinbora
5 years ago

New plugin wporg-bbp-code-blocks adding code expand/contract functionality

#2 @valentinbora
5 years ago

  • Keywords has-patch added

This ticket was mentioned in Slack in #meta by valentinbora. View the logs.


5 years ago

This ticket was mentioned in Slack in #forums by clorith. View the logs.


5 years ago

#5 @SergeyBiryukov
5 years ago

  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#6 @dd32
5 years ago

In 9607:

Support: Add a new plugin to fold long codeblocks.

This plugin isn't yet enabled, and is being added to meta.svn for followup commits and testing.

See #4835.

#7 @dd32
5 years ago

Apologies @valentinbora for missing the props on that commit, thanks for the starting point, I'm going to test with that and hopefully not make too many changes.

#8 @dd32
5 years ago

In 9608:

Support: Rename the plugin added in r9607 to better reflect it's purpose.

Props valentinbora for the original plugin.
See #4835.

#9 @dd32
5 years ago

In 9610:

Support: Code block expand/contract: Add translation support for the buttons.

See #4835.

#10 @dd32
5 years ago

In 9611:

Support: Reduce long code blocks to 20em instead of 40em.

Increasing the size might be needed, but this "feels" right to me with the expand/contract buttons.

See #4835.

#11 @dd32
5 years ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

Plugin is active on all Support forums, english and locales.

To activate it on all rosetta sites, I just used wp-cli, but as it doesn't support listing sites by path I used a SQL to generate all the CLI commands needed:

SELECT concat( 'bin/wp plugin activate wporg-bbp-code-blocks-expand-contract/wporg-bbp-code-blocks-expand-contract.php --url=https://', domain, path )
FROM wp_blogs WHERE site_id = 6 AND path = '/support/'
Note: See TracTickets for help on using tickets.