Skip to content

Commit

Permalink
[docs] Rename PluginFileSummary to ComponentFileSummary
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols committed Apr 28, 2022
1 parent 4491bb0 commit 1274a16
Show file tree
Hide file tree
Showing 34 changed files with 99 additions and 99 deletions.
6 changes: 3 additions & 3 deletions docs/_utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* along with Moodle. If not, see <http://www.gnu.org/licenses/>.
*/
import React from 'react';
import { PluginFileSummary as PluginFileSummaryGeneric } from '@site/src/components';
import { ComponentFileSummary as ComponentFileSummaryGeneric } from '@site/src/components';
import { getExample } from '@site/src/moodleBridge';

import type { Props } from '@site/src/moodleBridge';
Expand Down Expand Up @@ -63,7 +63,7 @@ export const getDescription = ({
);
};

export const PluginFileSummary = (initialProps: Props): ReactFragment => {
export const ComponentFileSummary = (initialProps: Props): ReactFragment => {
const props = fillDefaultProps({
examplePurpose: initialProps?.summary ?? null,
...initialProps,
Expand All @@ -75,5 +75,5 @@ export const PluginFileSummary = (initialProps: Props): ReactFragment => {
props.example = getExample(props, props?.defaultExample ?? null);
}

return PluginFileSummaryGeneric(props);
return ComponentFileSummaryGeneric(props);
};
6 changes: 3 additions & 3 deletions docs/apis/_files/amd-dir.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* along with Moodle. If not, see <http://www.gnu.org/licenses/>.
*/
import React from 'react';
import { PluginFileSummary } from '../../_utils';
import { ComponentFileSummary } from '../../_utils';
import type { Props } from '../../_utils';
import DefaultDescription from './amd-dir.mdx';

Expand All @@ -27,8 +27,8 @@ export const updateThings = (thingData) => {
};
`;

export default (initialProps: Props): PluginFileSummary => (
<PluginFileSummary
export default (initialProps: Props): ComponentFileSummary => (
<ComponentFileSummary
required
defaultDescription={DefaultDescription}
defaultExample={defaultExample}
Expand Down
6 changes: 3 additions & 3 deletions docs/apis/_files/backup-dir.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
* along with Moodle. If not, see <http://www.gnu.org/licenses/>.
*/
import React from 'react';
import { PluginFileSummary } from '../../_utils';
import { ComponentFileSummary } from '../../_utils';
import type { Props } from '../../_utils';
import DefaultDescription from './backup-dir.mdx';

export default (initialProps: Props): PluginFileSummary => (
<PluginFileSummary
export default (initialProps: Props): ComponentFileSummary => (
<ComponentFileSummary
filepath="/backup/"
summary="Plugin Backup configuration"
defaultDescription={DefaultDescription}
Expand Down
6 changes: 3 additions & 3 deletions docs/apis/_files/changes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
* along with Moodle. If not, see <http://www.gnu.org/licenses/>.
*/
import React from 'react';
import { PluginFileSummary } from '../../_utils';
import { ComponentFileSummary } from '../../_utils';
import type { Props } from '../../_utils';
import DefaultDescription from './changes.mdx';

export default (initialProps: Props): PluginFileSummary => (
<PluginFileSummary
export default (initialProps: Props): ComponentFileSummary => (
<ComponentFileSummary
filepath="/CHANGES"
filetype="php"
summary="Plugin changelog"
Expand Down
6 changes: 3 additions & 3 deletions docs/apis/_files/classes-dir.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
* along with Moodle. If not, see <http://www.gnu.org/licenses/>.
*/
import React from 'react';
import { PluginFileSummary } from '../../_utils';
import { ComponentFileSummary } from '../../_utils';
import type { Props } from '../../_utils';
import DefaultDescription from './classes-dir.mdx';

export default (initialProps: Props): PluginFileSummary => (
<PluginFileSummary
export default (initialProps: Props): ComponentFileSummary => (
<ComponentFileSummary
filepath="/classes/"
summary="Autoloaded classes"
defaultDescription={DefaultDescription}
Expand Down
6 changes: 3 additions & 3 deletions docs/apis/_files/cli-dir.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* along with Moodle. If not, see <http://www.gnu.org/licenses/>.
*/
import React from 'react';
import { PluginFileSummary } from '../../_utils';
import { ComponentFileSummary } from '../../_utils';
import type { Props } from '../../_utils';
import DefaultDescription from './cli-dir.mdx';

Expand All @@ -27,8 +27,8 @@ require_once("{$CFG->libdir}/clilib.php");
// Your CLI features go here.
`;

export default (initialProps: Props): PluginFileSummary => (
<PluginFileSummary
export default (initialProps: Props): ComponentFileSummary => (
<ComponentFileSummary
filepath="/cli/"
summary="CLI scripts"
exampleFilepath="/cli/example.php"
Expand Down
6 changes: 3 additions & 3 deletions docs/apis/_files/db-access-php.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* along with Moodle. If not, see <http://www.gnu.org/licenses/>.
*/
import React from 'react';
import { PluginFileSummary } from '../../_utils';
import { ComponentFileSummary } from '../../_utils';
import type { Props } from '../../_utils';
import DefaultDescription from './db-access-php.mdx';

Expand All @@ -33,8 +33,8 @@ const defaultExample = `$capabilities = [
];
`;

export default (initialProps: Props): PluginFileSummary => (
<PluginFileSummary
export default (initialProps: Props): ComponentFileSummary => (
<ComponentFileSummary
defaultDescription={DefaultDescription}
defaultExample={defaultExample}
filepath="/db/access.php"
Expand Down
6 changes: 3 additions & 3 deletions docs/apis/_files/db-events-php.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* along with Moodle. If not, see <http://www.gnu.org/licenses/>.
*/
import React from 'react';
import { PluginFileSummary } from '../../_utils';
import { ComponentFileSummary } from '../../_utils';
import type { Props } from '../../_utils';
import DefaultDescription from './db-events-php.mdx';

Expand All @@ -28,8 +28,8 @@ const defaultExample = `$observers = [
];
`;

export default (initialProps: Props): PluginFileSummary => (
<PluginFileSummary
export default (initialProps: Props): ComponentFileSummary => (
<ComponentFileSummary
refreshedDuringUpgrade
defaultDescription={DefaultDescription}
defaultExample={defaultExample}
Expand Down
6 changes: 3 additions & 3 deletions docs/apis/_files/db-install-php.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
* along with Moodle. If not, see <http://www.gnu.org/licenses/>.
*/
import React from 'react';
import { PluginFileSummary } from '../../_utils';
import { ComponentFileSummary } from '../../_utils';
import type { Props } from '../../_utils';
import DefaultDescription from './db-install-php.mdx';

export default (initialProps: Props): PluginFileSummary => (
<PluginFileSummary
export default (initialProps: Props): ComponentFileSummary => (
<ComponentFileSummary
defaultDescription={DefaultDescription}
filepath="/CHANGES"
filetype="php"
Expand Down
6 changes: 3 additions & 3 deletions docs/apis/_files/db-messages-php.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* along with Moodle. If not, see <http://www.gnu.org/licenses/>.
*/
import React from 'react';
import { PluginFileSummary } from '../../_utils';
import { ComponentFileSummary } from '../../_utils';
import type { Props } from '../../_utils';
import DefaultDescription from './db-messages-php.mdx';

Expand All @@ -29,8 +29,8 @@ $messageproviders = [
];
`;

export default (initialProps: Props): PluginFileSummary => (
<PluginFileSummary
export default (initialProps: Props): ComponentFileSummary => (
<ComponentFileSummary
refreshedDuringUpgrade
defaultExample={defaultExample}
defaultDescription={DefaultDescription}
Expand Down
6 changes: 3 additions & 3 deletions docs/apis/_files/db-mobile-php.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
* along with Moodle. If not, see <http://www.gnu.org/licenses/>.
*/
import React from 'react';
import { PluginFileSummary } from '../../_utils';
import { ComponentFileSummary } from '../../_utils';
import type { Props } from '../../_utils';
import DefaultDescription from './db-mobile-php.mdx';

export default (initialProps: Props): PluginFileSummary => (
<PluginFileSummary
export default (initialProps: Props): ComponentFileSummary => (
<ComponentFileSummary
refreshedDuringUpgrade
defaultDescription={DefaultDescription}
filepath="/db/mobile.php"
Expand Down
6 changes: 3 additions & 3 deletions docs/apis/_files/db-renamedclasses-php.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* along with Moodle. If not, see <http://www.gnu.org/licenses/>.
*/
import React from 'react';
import { PluginFileSummary } from '../../_utils';
import { ComponentFileSummary } from '../../_utils';
import type { Props } from '../../_utils';
import DefaultDescription from './db-renamedclasses-php.mdx';

Expand All @@ -36,8 +36,8 @@ $renamedclasses = [
];
`;

export default (initialProps: Props): PluginFileSummary => (
<PluginFileSummary
export default (initialProps: Props): ComponentFileSummary => (
<ComponentFileSummary
refreshedDuringPurge
defaultExample={defaultExample}
defaultDescription={DefaultDescription}
Expand Down
6 changes: 3 additions & 3 deletions docs/apis/_files/db-services-php.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* along with Moodle. If not, see <http://www.gnu.org/licenses/>.
*/
import React from 'react';
import { PluginFileSummary } from '../../_utils';
import { ComponentFileSummary } from '../../_utils';
import type { Props } from '../../_utils';
import DefaultDescription from './db-services-php.mdx';

Expand All @@ -35,8 +35,8 @@ $functions = [
];
`;

export default (initialProps: Props): PluginFileSummary => (
<PluginFileSummary
export default (initialProps: Props): ComponentFileSummary => (
<ComponentFileSummary
refreshedDuringUpgrade
recommended
filepath="/db/services.php"
Expand Down
6 changes: 3 additions & 3 deletions docs/apis/_files/db-uninstall-php.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
* along with Moodle. If not, see <http://www.gnu.org/licenses/>.
*/
import React from 'react';
import { PluginFileSummary } from '../../_utils';
import { ComponentFileSummary } from '../../_utils';
import type { Props } from '../../_utils';
import DefaultDescription from './db-uninstall-php.mdx';

export default (initialProps: Props): PluginFileSummary => (
<PluginFileSummary
export default (initialProps: Props): ComponentFileSummary => (
<ComponentFileSummary
defaultDescription={DefaultDescription}
filepath="/db/uninstall.php"
filetype="php"
Expand Down
6 changes: 3 additions & 3 deletions docs/apis/_files/db-upgrade-php.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* along with Moodle. If not, see <http://www.gnu.org/licenses/>.
*/
import React from 'react';
import { PluginFileSummary } from '../../_utils';
import { ComponentFileSummary } from '../../_utils';
import type { Props } from '../../_utils';
import DefaultDescription from './db-upgrade-php.mdx';

Expand All @@ -42,8 +42,8 @@ function xmldb_certificate_upgrade($oldversion = 0) {
}
}`;

export default (initialProps: Props): PluginFileSummary => (
<PluginFileSummary
export default (initialProps: Props): ComponentFileSummary => (
<ComponentFileSummary
recommended
defaultDescription={DefaultDescription}
defaultExample={defaultExample}
Expand Down
6 changes: 3 additions & 3 deletions docs/apis/_files/environment-xml.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* along with Moodle. If not, see <http://www.gnu.org/licenses/>.
*/
import React from 'react';
import { PluginFileSummary } from '../../_utils';
import { ComponentFileSummary } from '../../_utils';
import type { Props } from '../../_utils';
import DefaultDescription from './environment-xml.mdx';

Expand All @@ -30,8 +30,8 @@ const defaultExample = `
</PLUGIN>
</COMPATIBILITY_MATRIX>`;

export default (initialProps: Props): PluginFileSummary => (
<PluginFileSummary
export default (initialProps: Props): ComponentFileSummary => (
<ComponentFileSummary
showFileHeader={false}
showLicense={false}
refreshedDuringUpgrade
Expand Down
6 changes: 3 additions & 3 deletions docs/apis/_files/install-xml.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
* along with Moodle. If not, see <http://www.gnu.org/licenses/>.
*/
import React from 'react';
import { PluginFileSummary } from '../../_utils';
import { ComponentFileSummary } from '../../_utils';
import type { Props } from '../../_utils';
import DefaultDescription from './db-install-xml.mdx';

export default (initialProps: Props): PluginFileSummary => (
<PluginFileSummary
export default (initialProps: Props): ComponentFileSummary => (
<ComponentFileSummary
filepath="/db/install.xml"
summary="Database schema"
examplePurpose="Database schema"
Expand Down
6 changes: 3 additions & 3 deletions docs/apis/_files/lang.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
* along with Moodle. If not, see <http://www.gnu.org/licenses/>.
*/
import React from 'react';
import { PluginFileSummary } from '../../_utils';
import { ComponentFileSummary } from '../../_utils';
import type { Props } from '../../_utils';
import DefaultDescription from './lang.mdx';

const defaultExample = "$string['pluginname'] = 'The name of my plugin will go here';";

export default (initialProps: Props): PluginFileSummary => (
<PluginFileSummary
export default (initialProps: Props): ComponentFileSummary => (
<ComponentFileSummary
filepath="/lang/en/plugintype_pluginname.php"
refreshedDuringPurge
required
Expand Down
6 changes: 3 additions & 3 deletions docs/apis/_files/lib.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
* along with Moodle. If not, see <http://www.gnu.org/licenses/>.
*/
import React from 'react';
import { PluginFileSummary } from '../../_utils';
import { ComponentFileSummary } from '../../_utils';
import type { Props } from '../../_utils';
import DefaultDescription from './lib.mdx';

export default (initialProps: Props): PluginFileSummary => (
<PluginFileSummary
export default (initialProps: Props): ComponentFileSummary => (
<ComponentFileSummary
legacy
required={false}
filepath="/lib.php"
Expand Down
6 changes: 3 additions & 3 deletions docs/apis/_files/locallib.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
* along with Moodle. If not, see <http://www.gnu.org/licenses/>.
*/
import React from 'react';
import { PluginFileSummary } from '../../_utils';
import { ComponentFileSummary } from '../../_utils';
import type { Props } from '../../_utils';
import DefaultDescription from './locallib.mdx';

export default (initialProps: Props): PluginFileSummary => (
<PluginFileSummary
export default (initialProps: Props): ComponentFileSummary => (
<ComponentFileSummary
defaultDescription={DefaultDescription}
filepath="/locallib.php"
legacy
Expand Down
6 changes: 3 additions & 3 deletions docs/apis/_files/pix-dir.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
* along with Moodle. If not, see <http://www.gnu.org/licenses/>.
*/
import React from 'react';
import { PluginFileSummary } from '../../_utils';
import { ComponentFileSummary } from '../../_utils';
import type { Props } from '../../_utils';
import DefaultDescription from './pix-dir.mdx';

export default (initialProps: Props): PluginFileSummary => (
<PluginFileSummary
export default (initialProps: Props): ComponentFileSummary => (
<ComponentFileSummary
defaultDescription={DefaultDescription}
refreshedDuringPurge
filepath="/pix/"
Expand Down
6 changes: 3 additions & 3 deletions docs/apis/_files/readme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
* along with Moodle. If not, see <http://www.gnu.org/licenses/>.
*/
import React from 'react';
import { PluginFileSummary } from '../../_utils';
import { ComponentFileSummary } from '../../_utils';
import type { Props } from '../../_utils';
import DefaultDescription from './readme.mdx';

export default (initialProps: Props): PluginFileSummary => (
<PluginFileSummary
export default (initialProps: Props): ComponentFileSummary => (
<ComponentFileSummary
filepath="/README"
recommended
defaultDescription={DefaultDescription}
Expand Down
Loading

0 comments on commit 1274a16

Please sign in to comment.