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

supportsWeb property on Apps #273

Merged
merged 10 commits into from Aug 23, 2021
Merged

supportsWeb property on Apps #273

merged 10 commits into from Aug 23, 2021

Conversation

bdlukaa
Copy link
Contributor

@bdlukaa bdlukaa commented Aug 21, 2021

Description

Some apps aren't available on the web, such as the Terminal and Files Manager. This PR adds a property that enable apps to tell if they can run on the web or not. If not, they won't show up

Depends on dahliaOS/backend#5 to be landed first

Type of change

Please tick the relevant option by putting an X inside the bracket

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • All current GitHub actions pass
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings
  • I have read the CONTRIBUTING document

@larsb24
Copy link
Member

larsb24 commented Aug 21, 2021

All in all looks good, but I don't know if it would fix the web builds.
In my tests, the web builds would fail if the terminal and files package are imported.

@bdlukaa
Copy link
Contributor Author

bdlukaa commented Aug 22, 2021

I will check

lib/utils/app_list.dart Outdated Show resolved Hide resolved
lib/utils/wm_api.dart Outdated Show resolved Hide resolved
lib/utils/app_list.dart Outdated Show resolved Hide resolved
lib/desktop/taskbar/taskbar_item.dart Outdated Show resolved Hide resolved
@bdlukaa
Copy link
Contributor Author

bdlukaa commented Aug 23, 2021

@larsb24 @HrX03 Everything should work as expected now.

Here's the app running on my browser:

2021-08-23 (2)

@bdlukaa
Copy link
Contributor Author

bdlukaa commented Aug 23, 2021

The failing test is not my fault tho (I hope)

@HrX03
Copy link
Member

HrX03 commented Aug 23, 2021

Seems pretty good, could you also disable the app entry on the launcher if you didnt yet? I guess you can just reuse the logic for the taskbar items

@larsb24
Copy link
Member

larsb24 commented Aug 23, 2021

The failing test is not my fault tho (I hope)

Yeah, seems to be a gh workflow problem

@larsb24
Copy link
Member

larsb24 commented Aug 23, 2021

@larsb24 @HrX03 Everything should work as expected now.

Here's the app running on my browser:

2021-08-23 (2)

Hmm, can you try release mode pls?

@bdlukaa bdlukaa changed the title breaksWeb property on Apps supportsWeb property on Apps Aug 23, 2021
@bdlukaa
Copy link
Contributor Author

bdlukaa commented Aug 23, 2021

Seems pretty good, could you also disable the app entry on the launcher if you didnt yet?

Done @HrX03

Hmm, can you try release mode pls?

Working fine

@HrX03
Copy link
Member

HrX03 commented Aug 23, 2021

LGTM

@larsb24
Copy link
Member

larsb24 commented Aug 23, 2021

Seems pretty good, could you also disable the app entry on the launcher if you didnt yet?

Done @HrX03

Hmm, can you try release mode pls?

Working fine

Awesome!

Comment on lines +17 to +19
import 'apps_stub.dart' if (dart.library.io) 'package:files/main.dart';
// ignore: duplicate_import
import 'apps_stub.dart' if (dart.library.io) 'package:terminal/main.dart';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Basically what I do here is to import 'apps_stub.dart', but if we're running on dart:io, import both Files and Terminal.

@larsb24 larsb24 requested review from larsb24 and removed request for larsb24 August 23, 2021 17:15
@larsb24 larsb24 merged commit e7a4302 into dahliaOS:main Aug 23, 2021
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.

None yet

3 participants