Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(api): fix typo in attachTo anchor tag within isVisible #2351

Merged
merged 2 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions docs/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -1436,7 +1436,7 @@ isVisible(): boolean
**Details:**

::: warning
`isVisible()` only works correctly if the wrapper is attached to the DOM using [`attachTo`](#attachto)
`isVisible()` only works correctly if the wrapper is attached to the DOM using [`attachTo`](#attachTo)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch thanks. Can you change this in the french docs as well please?

Copy link
Contributor Author

@matusekma matusekma Feb 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! There is no equivalent in the French docs. I speak some French so I can try to add it. What's your suggestion?

Copy link
Member

@cexbrayat cexbrayat Feb 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it would be great to add the warning there as well 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi again @cexbrayat,
sorry for the late change. Could you please rereview my changes? I added the French warning + changed the examples for both languages bacause I think they did not follow the warning.
Thanks

:::

```js
Expand All @@ -1445,9 +1445,11 @@ const Component = {
}

test('isVisible', () => {
const wrapper = mount(Component)
const wrapper = mount(Component, {
attachTo: document.body
});

expect(wrapper.find('span').isVisible()).toBe(false)
expect(wrapper.find('span').isVisible()).toBe(false);
})
```

Expand Down
8 changes: 7 additions & 1 deletion docs/fr/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -1429,13 +1429,19 @@ isVisible(): boolean

**Utilisation :**

::: warning
`isVisible()` ne fonctionne correctement que si le wrapper est attaché au DOM en utilisant [`attachTo`](#attachTo)
:::

```js
const Component = {
template: `<div v-show="false"><span /></div>`,
};

test('isVisible', () => {
const wrapper = mount(Component);
const wrapper = mount(Component, {
attachTo: document.body
});

expect(wrapper.find('span').isVisible()).toBe(false);
});
Expand Down