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

Ms-file-viewer-bottombar #8965

Merged
merged 2 commits into from
Nov 25, 2024
Merged

Ms-file-viewer-bottombar #8965

merged 2 commits into from
Nov 25, 2024

Conversation

NicoTuxx
Copy link
Contributor

No description provided.

handler: () => void;
}

defineProps({
Copy link
Contributor

Choose a reason for hiding this comment

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

defineProps<{
  actions: Array<FileViewerAction>;
}>();

should work, why the extra steps?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@@ -117,7 +117,7 @@ export async function generateFolder(
export async function generateEntries(
basePath: FsPath,
folderCount = 2,
fileCount = 2,
fileCount = 10,
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't forget to revert this later.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

const src = ref('');
const audioElement = ref();
const paused = ref(true);
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you need this? You can access the paused value on the element itself to get its state. Same with volume.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes we need this part: audioElement as ref don't trigger its "change" state when using media controls.

import { ref, Ref, type Component, inject, onMounted, shallowRef } from 'vue';
// eslint-disable-next-line max-len
Copy link
Contributor

Choose a reason for hiding this comment

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

Nop, use prettier to format the line.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

import { MsActionBar, MsActionBarButton, Translatable } from 'megashark-lib';
import { PropType } from 'vue';

interface FileViewerAction {
Copy link
Contributor

Choose a reason for hiding this comment

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

You'll probably want a disabled attribute to prevent clicking in some cases (max zoom level reached for example).
Also better to extract this interface to a separate file to be able to import it for typing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since the action bar will change depending on the feature list we will make with Fabien on monday, I just add your suggestions as comment to keep it in mind in the next PR.

@NicoTuxx NicoTuxx force-pushed the ms-file-viewer-bottombar branch 3 times, most recently from 0a2164a to 33b6167 Compare November 22, 2024 16:26
- Create a FileViewerWrapper component to wrap the FileViewer and its action bar
- Isolate the FileViewerActionBar as a common component
- Update all the viewers component to use the new structure
- Improve all viewers UI/UX
- Add translation for 'opening file'
@NicoTuxx NicoTuxx force-pushed the ms-file-viewer-bottombar branch from 33b6167 to 24e4998 Compare November 22, 2024 16:32
@NicoTuxx NicoTuxx marked this pull request as ready for review November 22, 2024 16:32
@NicoTuxx NicoTuxx requested a review from a team as a code owner November 22, 2024 16:32
@Max-7 Max-7 added this pull request to the merge queue Nov 25, 2024
Merged via the queue into master with commit c480999 Nov 25, 2024
13 checks passed
@Max-7 Max-7 deleted the ms-file-viewer-bottombar branch November 25, 2024 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants