Skip to content

Commit

Permalink
bar.js: initializes Tabs (#580)
Browse files Browse the repository at this point in the history
  • Loading branch information
ViPErCZ authored Aug 7, 2024
1 parent e978bbc commit eeb2b4c
Show file tree
Hide file tree
Showing 14 changed files with 148 additions and 127 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/coding-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ jobs:
name: Nette Code Checker
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: 8.0
php-version: 8.1
coverage: none

- run: composer create-project nette/code-checker temp/code-checker ^3 --no-progress
Expand All @@ -21,10 +21,10 @@ jobs:
name: Nette Coding Standard
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: 8.0
php-version: 8.1
coverage: none

- run: composer create-project nette/coding-standard temp/coding-standard ^3 --no-progress
Expand All @@ -35,6 +35,6 @@ jobs:
name: Code Standard Checker (JS)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm install eslint
- run: npx eslint "src/**/*.js"
- uses: actions/checkout@v4
- run: npm install
- run: npx eslint
4 changes: 2 additions & 2 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ jobs:
name: PHPStan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: 8.0
php-version: 8.1
coverage: none

- run: composer install --no-progress --prefer-dist
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
php: ['8.0', '8.1', '8.2', '8.3']
php: ['8.1', '8.2', '8.3']
sapi: ['php', 'php-cgi']

fail-fast: false

name: PHP ${{ matrix.php }}/${{ matrix.sapi }} tests on ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
Expand All @@ -38,10 +38,10 @@ jobs:
name: Code Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: 8.0
php-version: 8.1
extensions: ds
coverage: none

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
}
],
"require": {
"php": ">=8.0 <8.4",
"php": "8.1 - 8.3",
"ext-session": "*",
"ext-json": "*"
},
Expand Down
26 changes: 21 additions & 5 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,20 +1,36 @@
import globals from 'globals';
import pluginJs from '@eslint/js';
import stylistic from '@stylistic/eslint-plugin';

export default [
{
ignores: ['*/*', '!src/*'],
},

pluginJs.configs.recommended,

stylistic.configs.customize({
indent: 'tab',
braceStyle: '1tbs',
arrowParens: true,
semi: true,
jsx: false,
}),

{
languageOptions: {
ecmaVersion: 'latest',
globals: globals.browser,
},
plugins: {
'@stylistic': stylistic,
},
rules: {
indent: ['error', 'tab'],
quotes: ['error', 'single'],
semi: ['error', 'always'],
'@stylistic/no-multiple-empty-lines': ['error', { max: 2, maxEOF: 0 }],
'@stylistic/new-parens': ['error', 'never'],
'@stylistic/padded-blocks': 'off',
'func-style': ['error', 'declaration', { allowArrowFunctions: true }],
'prefer-arrow-callback': ['error'],
'arrow-parens': ['error'],
'arrow-spacing': ['error'],
'no-var': ['error'],
},
},
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"devDependencies": {
"@eslint/js": "^9.1.1",
"eslint": "^9.1.1",
"globals": "^15.1.0"
"@eslint/js": "^9.4.0",
"@stylistic/eslint-plugin": "^2.1.0",
"eslint": "^9.4.0",
"globals": "^15.3.0"
}
}
35 changes: 23 additions & 12 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
[Tracy](https://tracy.nette.org) - PHP debugger
==============================================
[![Tracy](https://github.com/nette/tracy/assets/194960/f36323d8-486c-4a5e-b3f1-f97cd7c082ca)](https://tracy.nette.org)

[![Downloads this Month](https://img.shields.io/packagist/dm/tracy/tracy.svg)](https://packagist.org/packages/tracy/tracy)
[![Tests](https://github.com/nette/tracy/workflows/Tests/badge.svg?branch=master)](https://github.com/nette/tracy/actions)
[![Build Status Windows](https://ci.appveyor.com/api/projects/status/github/nette/tracy?branch=master&svg=true)](https://ci.appveyor.com/project/dg/tracy/branch/master)
[![Latest Stable Version](https://poser.pugx.org/tracy/tracy/v/stable)](https://github.com/nette/tracy/releases)
[![License](https://img.shields.io/badge/license-New%20BSD-blue.svg)](https://github.com/nette/tracy/blob/master/license.md)

 <!---->

Introduction
------------

Tracy library is a useful helper for everyday PHP programmers. It helps you to:

- quickly detect and correct errors
- log errors
- dump variables
- measure execution time of scripts/queries
- see memory consumption
✅ designed to facilitate debugging PHP code<br>
✅ hints and corrects you just like a good friend watching your back<br>
✅ damn cool visualization of errors


PHP is a perfect language for making hardly detectable errors because it gives great flexibility to programmers. Tracy\Debugger is more valuable because of that. It is an ultimate tool among the diagnostic ones.
Expand All @@ -26,6 +24,7 @@ If you are meeting Tracy for the first time, believe me, your life starts to be

Documentation can be found on the [website](https://tracy.nette.org).

 <!---->

[Support Tracy](https://github.com/sponsors/dg)
-----------------------------------------------
Expand All @@ -36,6 +35,7 @@ Do you like Tracy? Are you looking forward to the new features?

Thank you!

 <!---->

Installation and Requirements
-----------------------------
Expand All @@ -48,12 +48,10 @@ composer require tracy/tracy

Alternatively, you can download the whole package or [tracy.phar](https://github.com/nette/tracy/releases) file.

| Tracy | compatible with PHP | compatible with browsers
|-----------|---------------|----------
| Tracy 3.0 | PHP 8.0 – 8.3 | Chrome 112+, Firefox 117+, Safari 16.5+
| Tracy 2.10| PHP 8.0 – 8.3 | Chrome 64+, Firefox 69+, Safari 15.4+
| Tracy 2.9 | PHP 7.2 – 8.2 | Chrome 64+, Firefox 69+, Safari 13.1+

Tracy is compatible with PHP 8.1 to 8.3.

 <!---->

Usage
-----
Expand All @@ -71,6 +69,7 @@ Debugger::enable();
The first thing you'll notice on the page is the Tracy Bar in the bottom right corner. If you don't see it, it may mean that Tracy is running in production mode.
This is because Tracy is only visible on localhost for security reasons. To test if it works, you can temporarily put it into development mode using the `Debugger::enable(Debugger::Development)` parameter.

 <!---->

Tracy Bar
---------
Expand All @@ -87,6 +86,7 @@ If you do not want to show Tracy Bar, set:
Debugger::$showBar = false;
```

 <!---->

Visualization of Errors and Exceptions
--------------------------------------
Expand Down Expand Up @@ -135,6 +135,7 @@ Debugger::$strictMode = E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED; // all error

Note: Tracy when activated changes the error reporting level to E_ALL. If you want to change this, do so after calling `enable()`.

 <!---->

Development vs Production Mode
------------------------------
Expand Down Expand Up @@ -163,6 +164,7 @@ You can also directly set the development/production mode using the `Debugger::D

(If you use the Nette Framework, take a look at how to set the mode for it, and it will then also be used for Tracy.)

 <!---->

Error Logging
-------------
Expand Down Expand Up @@ -205,12 +207,14 @@ Debugger::$email = '[email protected]';

To protect your e-mail box from flood, Tracy sends **only one message** and creates a file `email-sent`. When a developer receives the e-mail notification, he checks the log, corrects his application and deletes the `email-sent` monitoring file. This activates the e-mail sending again.

 <!---->

Opening Files in the Editor
---------------------------

When the error page is displayed, you can click on file names and they will open in your editor with the cursor on the corresponding line. Files can also be created (action `create file`) or bug fixed in them (action `fix it`). In order to do this, you need to [configure the browser and the system](https://tracy.nette.org/cs/open-files-in-ide).

 <!---->

Variable Dumping
----------------
Expand Down Expand Up @@ -262,6 +266,7 @@ bdump([1, 3, 5, 7, 9], 'odd numbers up to ten');

![bar dump](https://nette.github.io/tracy/images/bardump-en.webp)

 <!---->

Stopwatch
---------
Expand Down Expand Up @@ -299,6 +304,7 @@ Debugger::timer(); // runs the timer
echo Debugger::timer(); // elapsed time in seconds
```

 <!---->

Custom Logger
-------------
Expand Down Expand Up @@ -330,6 +336,7 @@ services:
tracy.logger: SlackLogger
```

 <!---->

Monolog Integration
-------------------
Expand All @@ -348,6 +355,7 @@ Debugger::log('info'); // writes: [<TIMESTAMP>] main-channel.INFO: info [] []
Debugger::log('warning', Debugger::WARNING); // writes: [<TIMESTAMP>] main-channel.WARNING: warning [] []
```

 <!---->

Faster Loading
--------------
Expand All @@ -366,6 +374,7 @@ The solution is to place `<?php Tracy\Debugger::renderLoader() ?>` into your tem
</head>
```

 <!---->

AJAX and Redirected Requests
----------------------------
Expand Down Expand Up @@ -395,6 +404,7 @@ Debugger::dispatch();

The `setSessionStorage()` function has existed since version 2.9, before that Tracy always used the native PHP session.

 <!---->

Content Security Policy
-----------------------
Expand Down Expand Up @@ -433,6 +443,7 @@ change it to
try_files $uri $uri/ /index.php$is_args$args;
```

 <!---->

Integrations
------------
Expand Down
Loading

0 comments on commit eeb2b4c

Please sign in to comment.