Recent

Author Topic: Forum feature suggestion/request  (Read 2300 times)

440bx

  • Hero Member
  • *****
  • Posts: 6540
Forum feature suggestion/request
« on: April 30, 2020, 03:42:20 pm »
Hello :)

Code between tags (e.g, [ code = pascal ]) appears in its own window and there is a "select" option to cause all the code to be selected (and placed in the clipboard.)

When clicking on "select" the selection shows the line numbers as _not_ being selected but when the selected text is pasted into an editor, the line numbers are there.  Having the line numbers is not very convenient.  The simple workaround is to quote the post and select the code that appears between the tags but, that's obviously more time consuming than clicking on the "select" button.

The suggestion/request is: if it is possible _not_ to have the line numbers selected when clicking on "select" that would be very nice.   

The recent addition of a "+"/"-" to see all the code in a large enough window makes this feature even more desirable than it was in the past.  Let the good javascripts roll ;)
 
« Last Edit: April 30, 2020, 03:45:51 pm by 440bx »
FPC v3.2.2 and Lazarus v4.0rc3 on Windows 7 SP1 64bit.

PascalDragon

  • Hero Member
  • *****
  • Posts: 6398
  • Compiler Developer
Re: Forum feature suggestion/request
« Reply #1 on: April 30, 2020, 04:08:34 pm »
I can not reproduce that with Firefox 72.0.1 on x86_64-linux. I don't get the line numbers, but I do get some useless space at the front.

Example:

Code: Pascal  [Select][+][-]
  1. Some code

Using "Select" results in:
Code: [Select]
    Some code

lucamar

  • Hero Member
  • *****
  • Posts: 4217
Re: Forum feature suggestion/request
« Reply #2 on: April 30, 2020, 04:14:11 pm »
I can reproduce neither of those behaviours; I click "select", right-click inside the box, select "copy" and it copies the selected text as it is, both on webkit-based or Firefox browsers (Midori, Chromium, Firefox, K-Meleon, ...)

Sounds like it depends on the specific version of the JS engine of each browser, or some like that ... :-\
« Last Edit: April 30, 2020, 04:15:55 pm by lucamar »
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

440bx

  • Hero Member
  • *****
  • Posts: 6540
Re: Forum feature suggestion/request
« Reply #3 on: April 30, 2020, 04:20:13 pm »
@PascalDragon, @Lucamar

You are both right. 

I normally use IE 11 to browse the forum and, with that version of IE, I get the line numbers.  I just tried it with Google Chrome and with Chrome, I _don't_ get the line numbers.

Conclusion: I should probably abandon IE and use Chrome instead.

Thank you for checking that out and bringing the different behavior to my attention.


FPC v3.2.2 and Lazarus v4.0rc3 on Windows 7 SP1 64bit.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12429
  • Debugger - SynEdit - and more
    • wiki
Re: Forum feature suggestion/request
« Reply #4 on: April 30, 2020, 05:47:09 pm »
It works with most browsers. It's pretty impossible to get it to work with all of them. But you can try....

You can inspect the source, and see if you can find a better way. Though you better pre-test it with a variety of browsers.
Because if it does not work with browsers that currently are ok, then it is not going to be changed.
And also I have no plan to test half a dozen failing alternatives.

440bx

  • Hero Member
  • *****
  • Posts: 6540
Re: Forum feature suggestion/request
« Reply #5 on: April 30, 2020, 06:14:34 pm »
It's pretty impossible to get it to work with all of them. But you can try....
Browser hell... another common one.

And also I have no plan to test half a dozen failing alternatives.
Quite understandable and reasonable. 

I implemented the simple solution: I use Chrome to browse the forums and "select" works now (doesn't include line numbers). 

Thank you for the efforts you put into improving the forum software (among the other things you do.)
FPC v3.2.2 and Lazarus v4.0rc3 on Windows 7 SP1 64bit.

munair

  • Hero Member
  • *****
  • Posts: 887
  • compiler developer @SharpBASIC
    • SharpBASIC
Re: Forum feature suggestion/request
« Reply #6 on: April 30, 2020, 07:08:02 pm »
The Brave browser is a good Chrome alternative in my experience.
It's only logical.

Otto

  • Full Member
  • ***
  • Posts: 226
Re: Forum feature suggestion/request
« Reply #7 on: April 30, 2020, 07:19:11 pm »
Hello 440bx.

If you were using Windows 7 or higher, I would recommend using Firefox (including derivatives), as an alternative you could try Chromium-based Edge. I know you are a very experienced programmer and therefore you will easily infer the reason for my advice.
Kind regards.

440bx

  • Hero Member
  • *****
  • Posts: 6540
Re: Forum feature suggestion/request
« Reply #8 on: April 30, 2020, 07:41:39 pm »
@munair & @Otto

I thank you both for your suggestions.  I will likely look into them sometime in the future but, I admit, not now.

Just FYI, I find browsers to be software that is _barely_ tolerable.  It seems they (or the company that makes them) believe they "own" your computer. 

I decided to go with Chrome because I know how to beat the thing into submission.  To my satisfaction, it is currently complaining that it cannot update itself <that's because I neutered it ... no more territory marking in my computer... evil grin of satisfaction> and its "software reporter" thing has had its dna altered... it doesn't report much of anything anymore because it doesn't even get to run.

Adopting a different browser means I have to spend time figuring out the shenanigans it does and methods to make it behave.   I'm sure eventually I will have to but, for now, Chrome is doing the trick ... no more line numbers when I select code snippets. :)
 
« Last Edit: April 30, 2020, 07:43:12 pm by 440bx »
FPC v3.2.2 and Lazarus v4.0rc3 on Windows 7 SP1 64bit.

munair

  • Hero Member
  • *****
  • Posts: 887
  • compiler developer @SharpBASIC
    • SharpBASIC
Re: Forum feature suggestion/request
« Reply #9 on: April 30, 2020, 08:30:33 pm »
@munair & @Otto

I thank you both for your suggestions.  I will likely look into them sometime in the future but, I admit, not now.

Just FYI, I find browsers to be software that is _barely_ tolerable.  It seems they (or the company that makes them) believe they "own" your computer. 

I decided to go with Chrome because I know how to beat the thing into submission.  To my satisfaction, it is currently complaining that it cannot update itself <that's because I neutered it ... no more territory marking in my computer... evil grin of satisfaction> and its "software reporter" thing has had its dna altered... it doesn't report much of anything anymore because it doesn't even get to run.

Adopting a different browser means I have to spend time figuring out the shenanigans it does and methods to make it behave.   I'm sure eventually I will have to but, for now, Chrome is doing the trick ... no more line numbers when I select code snippets. :)
 
In that case you may find the Brave browser to your liking. By default it prevents Ad and SM tracking. It is based on Chromium (not Chrome), and independent of corporations. If I remember correctly one of the lead developers comes from Mozilla.
It's only logical.

 

TinyPortal © 2005-2018