Skip to content

Commit

Permalink
Merge branch 'main' into pe7er-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
HLeithner authored Nov 23, 2022
2 parents 647588e + ed7a75a commit d7ee12f
Show file tree
Hide file tree
Showing 47 changed files with 1,517 additions and 393 deletions.
39 changes: 39 additions & 0 deletions docs/building-extensions/components/table-columns.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# User-defined Hide Table Columns
All the core components have a button that lets the user decide which columns of a table to display.

## Adding Hide Table Columns to your component
Adding this functionality to your own component is very simple and is usually a simple case of adding the code below to the `tmpl` file for the table.

### Check if you are you using WebAssetManager
Look for this line of code in the php block at the top of your `tmpl` file.
```
$wa = $this->document->getWebAssetManager();
```

### Already using WebAssetManager
Add the following line to your existing code.

```
useScript('table.columns')
```

Note the line ending. Your final code will look similar to this example

```
/** @var \Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->document->getWebAssetManager();
$wa->useScript('table.columns')
->useScript('multiselect');
```

### Not using WebAssetManager (yet)
Add the following code anywhere in the php block at the top of your `tmpl` file.

```
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->document->getWebAssetManager();
$wa->useScript('table.columns');
```

### Note
Your table will need to be a valid html table with a `<thead>` and each column a `<th>`.
9 changes: 9 additions & 0 deletions docs/changelog/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
sidebar_position: 1000
---

Changes to the CMS and the API
==============================

The deprecations and code changes are version independent and can be found in the
[migration](/migrations) sections in this documentation.
9 changes: 0 additions & 9 deletions docs/code-migration/310-40/index.md

This file was deleted.

9 changes: 0 additions & 9 deletions docs/code-migration/42-43/index.md

This file was deleted.

12 changes: 0 additions & 12 deletions docs/code-migration/43-44/new-deprecations.md

This file was deleted.

12 changes: 0 additions & 12 deletions docs/code-migration/44-50/new-deprecations.md

This file was deleted.

13 changes: 0 additions & 13 deletions docs/code-migration/44-50/removed-backward-incompatibility.md

This file was deleted.

14 changes: 0 additions & 14 deletions docs/code-migration/index.md

This file was deleted.

11 changes: 0 additions & 11 deletions docs/get-started/git.md

This file was deleted.

95 changes: 95 additions & 0 deletions docs/get-started/git/git-basics.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
---
sidebar_position: 1
title: "Git Basics"
---

## Selected Git Features

This brief introduction to Git uses the command line to illustrate some of its features. If you want to try it out, download and install Git on your laptop or workstation: [git-scm.com](https://git-scm.com/).

### Repositories

A repository is a place where all of the changes in a project are stored. In the simplest case this is a folder named .git in the same folder as the project source files. To get started, create an empty folder, make it the current directory with `cd` and then try this command:

```
git init .
```

which should result in confirmation that an empty Git repository has been created in a hidden folder named .git (folders starting with a period(.) are usually left out of listings so you don't see them, hence hidden).

You may also use a remote repository on another computer, which is where GitHub comes in. That will be covered in separate articles.

Create some content with a text editor and save it in the source folder, the one containing the .git repo (the word repo is often used as a short form of repository). In this article this markdown document, aptly named git.md, is used as an example document. Confirm what you have with a list command:

```
ls -al
total 8
drwxr-xr-x 4 ceford staff 128 26 Aug 07:02 .
drwxr-xr-x+ 99 ceford staff 3168 26 Aug 06:31 ..
drwxr-xr-x 9 ceford staff 288 26 Aug 07:02 .git
-rw-r--r-- 1 ceford staff 1689 26 Aug 07:10 git.md
```

You can look at the contents of the .git folder if you wish but as a rule you should not make any changes there yourself. Let the git commands do the work. You can delete the .git folder if you wish without affecting the source text but you will lose any history of changes.

### Staging

The next step is to issue a command to add a source file to the index of files that git keeps track of:

```
git add git.md
```

There is no response to that command - git just does it.

### Commit

The commit command tells git to record all changes made to the source files so far:

```
git commit -m "Text entered as far as Commit"
```

To which the response is:

```
[master (root-commit) 913815c] Text entered as far as Commit
1 file changed, 45 insertions(+)
create mode 100644 git.md
```

That strange number, 913815c, is the commit **id** that allows git to keep track of that particular point in history. The text in quotes is the commit message - it should be a short informative description of the changes made in that commit.

### Branch

Suppose you want to try a new feature but you are not sure whether you will use it. Or, you are working on a collaborative project and you want to change something contributed by others. This is where branching comes in. You make a branch of your repo, checkout the branch, make your changes and then decide what to do. Try this:

```
git branch --list
* master
```

The list command indicates that this repo has only one branch, named master. Try these commands:

```
git branch myfix
git checkout myfix
git branch --list
master
* myfix
```
The list shows that there are now two branches and the * indicates that the myfix branch is checked out as the current branch. I can now go ahead and make changes to the myfix branch without affecting the existing content of the master branch. If I decide to use the changes I need to commit them and then either merge the myfix branch into my master branch or ask my collaborator to merge my myfix branch into his master branch.

When the branch is finished with, by being merged or abandoned, it can be deleted.

## Full Documentation

Git has many more commands and options. Mostly you don't need to know them because your IDE handles them for you with Menu items. If you want to look up what a menu item does try this source:

[Git Documentation](https://git-scm.com/doc)

If you have been experimenting, remember you can delete the repo (.git) and you will be left with your source files as you see them in your editor.

## Using an IDE

One final point: your chosen IDE will not put any IDE specific content in your git repo. It follows that you can change your IDE and expect it to work equally well with your existing repo.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/get-started/git/git-manual-vsc-sc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions docs/get-started/git/git.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
sidebar_position: 2
---
Git
=======================

From Wikipedia: [Git](https://en.wikipedia.org/wiki/Git) is free and open source software for distributed version control: tracking changes in any set of files, usually used for coordinating work among programmers collaboratively developing source code during software development. Its goals include speed, data integrity, and support for distributed, non-linear workflows (thousands of parallel branches running on different systems).

Git is available for all modern platforms. It is mostly associated with managing code such as PHP, Java or Python but it can be used to manage any line-based text such as this documentation written in Markdown format. Git can be used from the command line although most users rely on an Integrated Development Environment (IDE) to compose and run git commands.

To learn more, start with the Git Basics page and then move on to the cited Github based examples.

## References

The following articles are from docs.joomla.org:

- [Git Branching Quickstart](https://docs.joomla.org/Git_branching_quickstart)
- [Working with git and github](https://docs.joomla.org/Working_with_git_and_github)
- [Git for Testers and Trackers](https://docs.joomla.org/Git_for_Testers_and_Trackers)
- [Setting up Eclipse PDT 2020 and Git for Pulls](https://docs.joomla.org/Setting_up_Eclipse_PDT_2020_and_Git_for_Pulls)
- [My first pull request to Joomla! on Github](https://docs.joomla.org/My_first_pull_request_to_Joomla!_on_Github)

These references may be deleted when the new documentation is considered *mature*.
Loading

0 comments on commit d7ee12f

Please sign in to comment.